Streamline unexported function build fixes
authorachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Feb 2015 20:08:15 +0000 (20:08 +0000)
committerachristensen@apple.com <achristensen@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 18 Feb 2015 20:08:15 +0000 (20:08 +0000)
https://bugs.webkit.org/show_bug.cgi?id=141761

Patch by Alexey Proskuryakov <ap@apple.com> on 2015-02-18
Reviewed by Alex Christensen.

Source/WebCore:

* Configurations/WebCore.unexp: Added some functions for symbols only used on newer
OS versions. Removed a special case for NodeList, to handle it uniformly with Node.

* Configurations/WebCore.xcconfig: Made the unexported list unconditional, because
it's not only Xcode 5 that is affected.

* bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): We already had a hack for
Node, NodeList needs an exactly the same one. Also updated the comments.

Tools:

* Scripts/check-for-weak-vtables-and-externals: (readXcode5SymbolsToIgnore): Deleted.
We don't need to ignore symbols that are not exported due to the .unexp file.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@180282 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/Configurations/WebCore.unexp
Source/WebCore/Configurations/WebCore.xcconfig
Source/WebCore/bindings/scripts/CodeGeneratorJS.pm
Tools/ChangeLog
Tools/Scripts/check-for-weak-vtables-and-externals

index b65068c..9a7214d 100644 (file)
@@ -1,3 +1,19 @@
+2015-02-18  Alexey Proskuryakov  <ap@apple.com>
+
+        Streamline unexported function build fixes
+        https://bugs.webkit.org/show_bug.cgi?id=141761
+
+        Reviewed by Alex Christensen.
+
+        * Configurations/WebCore.unexp: Added some functions for symbols only used on newer
+        OS versions. Removed a special case for NodeList, to handle it uniformly with Node.
+
+        * Configurations/WebCore.xcconfig: Made the unexported list unconditional, because
+        it's not only Xcode 5 that is affected.
+
+        * bindings/scripts/CodeGeneratorJS.pm: (GenerateHeader): We already had a hack for
+        Node, NodeList needs an exactly the same one. Also updated the comments.
+
 2015-02-18  Chris Dumez  <cdumez@apple.com>
 
         Access FontCache global instance via singleton() static member function
index e2e8f0f..4f68657 100644 (file)
@@ -87,8 +87,22 @@ _VTPixelTransferSessionTransferImage
 # Function marked ALWAYS_INLINE in header, but may not be inlined in a
 # Debug build.
 
-# Source/WebCore/bindings/js/JSNodeListCustom.h
-__ZN7WebCore4toJSEPN3JSC9ExecStateEPNS_17JSDOMGlobalObjectEPNS_8NodeListE
+# Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferPrivateAVFObjC.mm
+_CMFormatDescriptionGetMediaSubType
+_CMFormatDescriptionGetMediaType
+_CMSampleBufferCreateCopy
+_CMSampleBufferCreateCopyWithNewTiming
+_CMSampleBufferGetDecodeTimeStamp
+_CMSampleBufferGetDuration
+_CMSampleBufferGetPresentationTimeStamp
+_CMSampleBufferGetSampleAttachmentsArray
+_CMSampleBufferGetSampleTimingInfoArray
+_CMSampleBufferGetTotalSampleSize
+_CMVideoFormatDescriptionGetPresentationDimensions
+
+# Source/WebCore/platform/cocoa/TelephoneNumberDetectorCocoa.cpp
+_DDDFAScannerCreateFromCache
+_DDDFAScannerFirstResultInUnicharArray
 
 # Subclasses of an exported C++ class in JavaScriptCore.
 
index 0a27f16..3a330c6 100644 (file)
@@ -51,8 +51,7 @@ DYLIB_INSTALL_NAME_BASE_PLATFORM[sdk=macosx*] = $(NORMAL_WEBCORE_FRAMEWORKS_DIR)
 INSTALLHDRS_COPY_PHASE = YES;
 INSTALLHDRS_SCRIPT_PHASE = YES;
 PRODUCT_NAME = WebCore;
-UNEXPORTED_SYMBOLS_FILE_xcode_0500 = Configurations/WebCore.unexp;
-UNEXPORTED_SYMBOLS_FILE = $(UNEXPORTED_SYMBOLS_FILE_xcode_$(XCODE_VERSION_MAJOR));
+UNEXPORTED_SYMBOLS_FILE = Configurations/WebCore.unexp;
 OTHER_LDFLAGS = $(inherited) $(OTHER_LDFLAGS_PLATFORM);
 OTHER_LDFLAGS_BASE = -lsqlite3 -lobjc -lANGLE;
 OTHER_LDFLAGS_BASE_ios = $(OTHER_LDFLAGS_BASE) -framework CFNetwork -framework CoreGraphics -framework CoreText -framework Foundation -framework GraphicsServices -framework ImageIO -framework OpenGLES -lMobileGestalt;
index db48a74..e50ef4d 100644 (file)
@@ -1149,8 +1149,9 @@ sub GenerateHeader
         push(@headerContent, "\n");
     }
     if (ShouldGenerateToJSDeclaration($hasParent, $interface)) {
-        # Node needs to not be exported, others need to be exported.
-        if ($implType eq "Node") {
+        # Node and NodeList have custom inline implementations which thus cannot be exported.
+        # FIXME: The special case for Node and NodeList should probably be implemented via an IDL attribute.
+        if ($implType eq "Node" or $implType eq "NodeList") {
             push(@headerContent, "JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, $implType*);\n");
         } else {
             push(@headerContent, "WEBCORE_EXPORT JSC::JSValue toJS(JSC::ExecState*, JSDOMGlobalObject*, $implType*);\n");
index 8a5d608..99945e3 100644 (file)
@@ -1,3 +1,13 @@
+2015-02-18  Alexey Proskuryakov  <ap@apple.com>
+
+        Streamline unexported function build fixes
+        https://bugs.webkit.org/show_bug.cgi?id=141761
+
+        Reviewed by Alex Christensen.
+
+        * Scripts/check-for-weak-vtables-and-externals: (readXcode5SymbolsToIgnore): Deleted.
+        We don't need to ignore symbols that are not exported due to the .unexp file.
+
 2015-02-18  Timothy Horton  <timothy_horton@apple.com>
 
         Remove more references to WebCore.exp.in
index 4fbaf5f..03e34cb 100755 (executable)
@@ -36,7 +36,6 @@ use FindBin;
 use lib $FindBin::Bin;
 use webkitdirs;
 
-sub readXcode5SymbolsToIgnore();
 sub touch($);
 
 my $arch = $ENV{'CURRENT_ARCH'};
@@ -65,8 +64,6 @@ if (!defined $executablePathAge || !defined $buildTimestampAge || $executablePat
     }
     my @weakVTableClasses = ();
     my @weakExternalSymbols = ();
-    my $isXcode5 = $ENV{'XCODE_VERSION_MAJOR'} eq "0500";
-    my $ignoreXcode5SymbolsRegex = $isXcode5 ? "(" . join("|", grep(quotemeta($_), readXcode5SymbolsToIgnore())) . ")" : undef;
     while (<NM>) {
         if (/^STDOUT:/) {
             # Ignore undefined, RTTI and typeinfo symbols.
@@ -75,9 +72,6 @@ if (!defined $executablePathAge || !defined $buildTimestampAge || $executablePat
             # ASan compiler-rt calls into __asan_mapping_offset and __asan_mapping_scale
             next if /\b___asan/;
 
-            # Symbols that need to be ignored when building with Xcode 5.x.
-            next if $isXcode5 && /\b${ignoreXcode5SymbolsRegex}\b/;
-
             if (/weak external vtable for (.*)$/) {
                 push @weakVTableClasses, $1;
             } elsif (/weak external (.*)$/) {
@@ -121,24 +115,6 @@ touch($buildTimestampPath);
 
 exit 0;
 
-sub readXcode5SymbolsToIgnore()
-{
-    my $unexportFile = "Source/WebCore/Configurations/WebCore.unexp";
-
-    open(SYMBOLS, File::Spec->catfile(sourceDir(), $unexportFile)) or die "$!";
-
-    my @result;
-    while (<SYMBOLS>) {
-        s/#.*$//;
-        s/^\s+|\s+$//g;
-        push(@result, $_) if $_;
-    }
-
-    close(SYMBOLS);
-
-    return @result;
-}
-
 sub touch($)
 {
     my ($path) = @_;