Modified: trunk/Source/WebKit/ChangeLog (269262 => 269263)
--- trunk/Source/WebKit/ChangeLog 2020-11-02 19:45:00 UTC (rev 269262)
+++ trunk/Source/WebKit/ChangeLog 2020-11-02 19:46:29 UTC (rev 269263)
@@ -1,3 +1,29 @@
+2020-11-02 Aditya Keerthi <[email protected]>
+
+ [iOS] Link Contacts.framework during build
+ https://bugs.webkit.org/show_bug.cgi?id=218289
+ <rdar://problem/70770410>
+
+ Reviewed by Andy Estes.
+
+ Contacts.framework is currrently soft linked in PaymentAuthorizationPresenter.
+ Soft linking is generally discouraged, since it requires running the linker
+ at runtime, leading to an unwanted performance cost. By normally linking
+ the framework, the linkage is declared at build time, which enables running
+ the linker at build/update/install time and avoiding the runtime cost.
+
+ Unfortunately, we still have to soft link the framework on macOS, to avoid
+ introducing a dependency cycle. Upward linking is not an option, since the
+ Contacts framework does not implement InstallAPI.
+
+ The SOFT_LINK_FRAMEWORK macro has been kept in PaymentAuthorizationPresenter
+ to avoid introducing additional #ifs. This should be fine to keep on iOS,
+ since the framework will already loaded in the address space, and the call
+ to dlopen() should be much less expensive.
+
+ * Configurations/WebKit.xcconfig:
+ * Platform/cocoa/PaymentAuthorizationPresenter.mm:
+
2020-11-02 Chris Dumez <[email protected]>
Crash under ProcessThrottler::setAssertionType()
Modified: trunk/Source/WebKit/Configurations/WebKit.xcconfig (269262 => 269263)
--- trunk/Source/WebKit/Configurations/WebKit.xcconfig 2020-11-02 19:45:00 UTC (rev 269262)
+++ trunk/Source/WebKit/Configurations/WebKit.xcconfig 2020-11-02 19:46:29 UTC (rev 269263)
@@ -59,6 +59,10 @@
WK_CARBON_LDFLAGS = $(WK_CARBON_LDFLAGS_$(WK_PLATFORM_NAME));
WK_CARBON_LDFLAGS_macosx = -framework Carbon;
+WK_CONTACTS_LDFLAGS = $(WK_CONTACTS_LDFLAGS_$(WK_PLATFORM_NAME));
+WK_CONTACTS_LDFLAGS_iphoneos = -framework Contacts;
+WK_CONTACTS_LDFLAGS_iphonesimulator = -framework Contacts;
+
WK_CORE_PREDICTION_LDFLAGS = $(WK_CORE_PREDICTION_LDFLAGS_$(WK_HAVE_CORE_PREDICTION));
WK_CORE_PREDICTION_LDFLAGS_YES = $(WK_MACOS_WEAK_FRAMEWORK) CorePrediction;
@@ -118,7 +122,7 @@
WK_AUTHKIT_LDFLAGS_macosx = $(WK_AUTHKIT_LDFLAGS$(WK_MACOS_1015));
WK_AUTHKIT_LDFLAGS_MACOS_SINCE_1015 = -framework AuthKit;
-FRAMEWORK_AND_LIBRARY_LDFLAGS = -lobjc -framework CFNetwork -framework CoreAudio -framework CoreFoundation -framework CoreGraphics -framework CoreText -framework Foundation -framework ImageIO -framework IOKit -framework IOSurface -framework WebKitLegacy -lnetwork $(WK_ACCESSIBILITY_LDFLAGS) $(WK_APPKIT_LDFLAGS) $(WK_BACKBOARD_SERVICES_LDFLAGS) $(WK_RUNNINGBOARD_SERVICES_LDFLAGS) $(WK_AUTHKIT_LDFLAGS) $(WK_CARBON_LDFLAGS) $(WK_CORE_PREDICTION_LDFLAGS) $(WK_CORE_SERVICES_LDFLAGS) $(WK_GRAPHICS_SERVICES_LDFLAGS) $(WK_LIBSANDBOX_LDFLAGS) $(WK_LIBWEBRTC_LDFLAGS) $(WK_MOBILE_CORE_SERVICES_LDFLAGS) $(WK_MOBILE_GESTALT_LDFLAGS) $(WK_PDFKIT_LDFLAGS) $(WK_SAFE_BROWSING_LDFLAGS) $(WK_SECURITY_INTERFACE_LDFLAGS) $(WK_UIKIT_LDFLAGS) $(WK_URL_FORMATTING_LDFLAGS) $(WK_WEBINSPECTORUI_LDFLAGS);
+FRAMEWORK_AND_LIBRARY_LDFLAGS = -lobjc -framework CFNetwork -framework CoreAudio -framework CoreFoundation -framework CoreGraphics -framework CoreText -framework Foundation -framework ImageIO -framework IOKit -framework IOSurface -framework WebKitLegacy -lnetwork $(WK_ACCESSIBILITY_LDFLAGS) $(WK_APPKIT_LDFLAGS) $(WK_BACKBOARD_SERVICES_LDFLAGS) $(WK_RUNNINGBOARD_SERVICES_LDFLAGS) $(WK_AUTHKIT_LDFLAGS) $(WK_CARBON_LDFLAGS) $(WK_CONTACTS_LDFLAGS) $(WK_CORE_PREDICTION_LDFLAGS) $(WK_CORE_SERVICES_LDFLAGS) $(WK_GRAPHICS_SERVICES_LDFLAGS) $(WK_LIBSANDBOX_LDFLAGS) $(WK_LIBWEBRTC_LDFLAGS) $(WK_MOBILE_CORE_SERVICES_LDFLAGS) $(WK_MOBILE_GESTALT_LDFLAGS) $(WK_PDFKIT_LDFLAGS) $(WK_SAFE_BROWSING_LDFLAGS) $(WK_SECURITY_INTERFACE_LDFLAGS) $(WK_UIKIT_LDFLAGS) $(WK_URL_FORMATTING_LDFLAGS) $(WK_WEBINSPECTORUI_LDFLAGS);
// Prevent C++ standard library basic_stringstream, operator new, delete and their related exception types from being exported as weak symbols.
UNEXPORTED_SYMBOL_LDFLAGS = -Wl,-unexported_symbol -Wl,__ZTISt9bad_alloc -Wl,-unexported_symbol -Wl,__ZTISt9exception -Wl,-unexported_symbol -Wl,__ZTSSt9bad_alloc -Wl,-unexported_symbol -Wl,__ZTSSt9exception -Wl,-unexported_symbol -Wl,__ZdlPvS_ -Wl,-unexported_symbol -Wl,__ZnwmPv -Wl,-unexported_symbol -Wl,__Znwm -Wl,-unexported_symbol -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEEC2EOS4_ -Wl,-unexported_symbol -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEEC1EOS4_ -Wl,-unexported_symbol -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEEaSEDn -Wl,-unexported_symbol -Wl,__ZNKSt3__18functionIFvN7WebCore12PolicyActionEEEclES2_ -Wl,-unexported_symbol -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEE4swapERS4_ -Wl,-unexported_symbol -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEEC1ERKS4_ -Wl,-unexported_symbol -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEEC2ERKS4_ -Wl,-unexported_symbol -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEE
ED1Ev -Wl,-unexported_symbol -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEED2Ev -Wl,-unexported_symbol -Wl,__ZNSt3__18functionIFvN7WebCore12PolicyActionEEEaSERKS4_ -Wl,-unexported_symbol -Wl,__ZTVNSt3__117bad_function_callE -Wl,-unexported_symbol -Wl,__ZTCNSt3__118basic_stringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEE0_NS_13basic_istreamIcS2_EE -Wl,-unexported_symbol -Wl,__ZTCNSt3__118basic_stringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEE0_NS_14basic_iostreamIcS2_EE -Wl,-unexported_symbol -Wl,__ZTCNSt3__118basic_stringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEE16_NS_13basic_ostreamIcS2_EE -Wl,-unexported_symbol -Wl,__ZTTNSt3__118basic_stringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEE -Wl,-unexported_symbol -Wl,__ZTVNSt3__115basic_stringbufIcNS_11char_traitsIcEENS_9allocatorIcEEEE -Wl,-unexported_symbol -Wl,__ZTVNSt3__118basic_stringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEE -Wl,-unexported_symbol -Wl,__ZTCNSt3__118basic_stringstreamIcNS_11char_traitsIcEE
NS_9allocatorIcEEEE8_NS_13basic_ostreamIcS2_EE;
Modified: trunk/Source/WebKit/Platform/cocoa/PaymentAuthorizationPresenter.mm (269262 => 269263)
--- trunk/Source/WebKit/Platform/cocoa/PaymentAuthorizationPresenter.mm 2020-11-02 19:45:00 UTC (rev 269262)
+++ trunk/Source/WebKit/Platform/cocoa/PaymentAuthorizationPresenter.mm 2020-11-02 19:46:29 UTC (rev 269263)
@@ -38,6 +38,8 @@
#import <pal/cocoa/PassKitSoftLink.h>
+// FIXME: Stop soft linking Contacts once the dependency cycle is removed on macOS (<rdar://problem/70887934>),
+// or when Contacts can be upward linked (<rdar://problem/36135137>).
SOFT_LINK_FRAMEWORK(Contacts);
SOFT_LINK_CONSTANT(Contacts, CNPostalAddressCityKey, NSString *);
SOFT_LINK_CONSTANT(Contacts, CNPostalAddressCountryKey, NSString *);