Title: [219294] trunk/Source/WebCore
Revision
219294
Author
[email protected]
Date
2017-07-10 09:21:41 -0700 (Mon, 10 Jul 2017)

Log Message

REGRESSION (r218616): Cannot build WebCore for macOS 10.12 with macOS 10.13 SDK
https://bugs.webkit.org/show_bug.cgi?id=173939

Reviewed by Dan Bernstein.

(The code in this change was either suggested or written by Dan Bernstein with a very
minor adjustment to get it to build).

Allow WebCore to link even though CTFontCreatePhysicalFontForCharactersWithLanguage() is
undefined when building against the macOS 10.13 SDK targeting macOS 10.12. Let the dynamic
linker resolve the undefined symbol.

For completeness the SPI CTFontCreatePhysicalFontForCharactersWithLanguage() was removed
from the macOS 10.13 SDK.

* Configurations/WebCore.xcconfig: Tell the linker that CTFontCreatePhysicalFontForCharactersWithLanguage()
can be undefined when building against macOS 10.13 or later SDK.
* platform/spi/cocoa/CoreTextSPI.h: Annotate CTFontCreatePhysicalFontForCharactersWithLanguage()
with its availability information.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (219293 => 219294)


--- trunk/Source/WebCore/ChangeLog	2017-07-10 16:17:00 UTC (rev 219293)
+++ trunk/Source/WebCore/ChangeLog	2017-07-10 16:21:41 UTC (rev 219294)
@@ -1,3 +1,25 @@
+2017-07-10  Daniel Bates  <[email protected]>
+
+        REGRESSION (r218616): Cannot build WebCore for macOS 10.12 with macOS 10.13 SDK
+        https://bugs.webkit.org/show_bug.cgi?id=173939
+
+        Reviewed by Dan Bernstein.
+
+        (The code in this change was either suggested or written by Dan Bernstein with a very
+        minor adjustment to get it to build).
+
+        Allow WebCore to link even though CTFontCreatePhysicalFontForCharactersWithLanguage() is
+        undefined when building against the macOS 10.13 SDK targeting macOS 10.12. Let the dynamic
+        linker resolve the undefined symbol.
+
+        For completeness the SPI CTFontCreatePhysicalFontForCharactersWithLanguage() was removed
+        from the macOS 10.13 SDK.
+
+        * Configurations/WebCore.xcconfig: Tell the linker that CTFontCreatePhysicalFontForCharactersWithLanguage()
+        can be undefined when building against macOS 10.13 or later SDK.
+        * platform/spi/cocoa/CoreTextSPI.h: Annotate CTFontCreatePhysicalFontForCharactersWithLanguage()
+        with its availability information.
+
 2017-07-10  Zalan Bujtas  <[email protected]>
 
         Block of text is missing in iBooks sample books.

Modified: trunk/Source/WebCore/Configurations/WebCore.xcconfig (219293 => 219294)


--- trunk/Source/WebCore/Configurations/WebCore.xcconfig	2017-07-10 16:17:00 UTC (rev 219293)
+++ trunk/Source/WebCore/Configurations/WebCore.xcconfig	2017-07-10 16:21:41 UTC (rev 219294)
@@ -76,7 +76,7 @@
 LIBWEBRTC_LIBRARY_DIR_USE_OVERRIDE_FRAMEWORKS_DIR_NO = $(WEBCORE_FRAMEWORKS_DIR)/WebCore.framework/Versions/A/Frameworks;
 LIBWEBRTC_LIBRARY_DIR_USE_OVERRIDE_FRAMEWORKS_DIR_YES = $(WK_OVERRIDE_FRAMEWORKS_DIR);
 
-OTHER_LDFLAGS = $(inherited) $(WK_RELOCATABLE_FRAMEWORK_LDFLAGS) $(OTHER_LDFLAGS_PLATFORM);
+OTHER_LDFLAGS = $(inherited) $(WK_RELOCATABLE_FRAMEWORK_LDFLAGS) $(WK_UNDEFINED_SYMBOLS_LDFLAGS) $(OTHER_LDFLAGS_PLATFORM);
 OTHER_LDFLAGS_BASE = -lsqlite3 -lobjc -lANGLE -framework CoreAudio -framework Metal -allowable_client WebCoreTestSupport -allowable_client WebKitLegacy;
 // FIXME: Reduce the number of allowable_client <rdar://problem/31823969>
 OTHER_LDFLAGS_BASE_ios = $(OTHER_LDFLAGS_BASE) -framework CFNetwork -framework CoreGraphics -framework CoreText -framework Foundation -framework ImageIO -framework MobileCoreServices -framework OpenGLES -lMobileGestalt $(WK_IOS_BINCOMPAT_LDFLAGS) -allowable_client WebKit -allowable_client iTunesU -allowable_client Casablanca -allowable_client Remote -allowable_client TVBooks -allowable_client DumpRenderTree -allowable_client WebKitTestRunner -allowable_client TestWebKitAPI;
@@ -84,6 +84,10 @@
 OTHER_LDFLAGS_PLATFORM[sdk=iphonesimulator*] = $(OTHER_LDFLAGS_BASE_ios) $(LIBWEBRTC_LDFLAGS);
 OTHER_LDFLAGS_PLATFORM[sdk=macosx*] = $(OTHER_LDFLAGS_BASE) -sub_library libobjc -umbrella WebKit -framework ApplicationServices -framework AudioUnit -framework Carbon -framework Cocoa -framework DataDetectorsCore -framework IOSurface -framework OpenGL -framework SystemConfiguration $(LIBWEBRTC_LDFLAGS);
 
+WK_UNDEFINED_SYMBOLS_LDFLAGS = $(WK_UNDEFINED_SYMBOLS_LDFLAGS_$(TARGET_MAC_OS_X_VERSION_LESS_THAN_1013000));
+WK_UNDEFINED_SYMBOLS_LDFLAGS_YES = -Wl,-U,_CTFontCreatePhysicalFontForCharactersWithLanguage;
+WK_UNDEFINED_SYMBOLS_LDFLAGS_YES[sdk=macosx10.12*] =;
+
 SECTORDER_FLAGS = $(SECTORDER_FLAGS_$(CONFIGURATION));
 SECTORDER_FLAGS_Production[sdk=iphoneos*] = -Wl,-order_file,$(SDKROOT)/AppleInternal/OrderFiles/WebCore.order;
 SECTORDER_FLAGS_Production[sdk=macosx*] = -Wl,-order_file,WebCore.order;

Modified: trunk/Source/WebCore/platform/spi/cocoa/CoreTextSPI.h (219293 => 219294)


--- trunk/Source/WebCore/platform/spi/cocoa/CoreTextSPI.h	2017-07-10 16:17:00 UTC (rev 219293)
+++ trunk/Source/WebCore/platform/spi/cocoa/CoreTextSPI.h	2017-07-10 16:21:41 UTC (rev 219294)
@@ -130,7 +130,7 @@
 extern const CFStringRef kCTUIFontTextStyleTitle4;
 CTFontDescriptorRef CTFontCreatePhysicalFontDescriptorForCharactersWithLanguage(CTFontRef currentFont, const UTF16Char* characters, CFIndex length, CFStringRef language, CFIndex* coveredLength);
 
-CTFontRef CTFontCreatePhysicalFontForCharactersWithLanguage(CTFontRef, const UTF16Char* characters, CFIndex length, CFStringRef language, CFIndex* coveredLength);
+__attribute__((availability(macosx,obsoleted=10.13))) __attribute__((availability(ios,obsoleted=11.0))) CTFontRef CTFontCreatePhysicalFontForCharactersWithLanguage(CTFontRef, const UTF16Char* characters, CFIndex length, CFStringRef language, CFIndex* coveredLength);
 bool CTFontIsAppleColorEmoji(CTFontRef);
 CTFontRef CTFontCreateForCharacters(CTFontRef currentFont, const UTF16Char *characters, CFIndex length, CFIndex *coveredLength);
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to