Changeset 229738 in webkit
- Timestamp:
- Mar 19, 2018 8:26:15 PM (6 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r229727 r229738 1 2018-03-19 Dan Bernstein <mitz@apple.com> 2 3 Investigate why __cpu_indicator_init is used 4 https://bugs.webkit.org/show_bug.cgi?id=183736 5 6 Reviewed by Tim Horton. 7 8 __cpu_indicator_init, which is a global initializer, was included in JavaScriptCore because 9 we were passing the -all_load option to the linker, causing it to bring in all members of 10 every static library being linked in, including the compiler runtime library. We only need 11 to load all members of WTF. The linker option for doing that is -force_load, and it requires 12 a path to the library. To support building against libWTF.a built locally as well as against 13 the copy that is in the SDK, we add a script build phase that palces a symbolic link to the 14 appropriate libWTF.a under the DerivedSources directory, and pass the path to that symlink 15 to the linker. Also, while cleaning up linker flags, make OTHER_LDFLAGS_HIDE_SYMBOLS less 16 verbose by eliminating every other -Wl, remove redundant -lobjc (libobjc is already listed 17 in the Link Binary With Libraries build phase), remove long-unsupported -Y,3, and stop 18 reexporting libobjc. 19 20 * Configurations/JavaScriptCore.xcconfig: 21 * JavaScriptCore.xcodeproj/project.pbxproj: 22 1 23 2018-03-19 Jiewen Tan <jiewen_tan@apple.com> 2 24 -
trunk/Source/JavaScriptCore/Configurations/JavaScriptCore.xcconfig
r219282 r229738 36 36 37 37 // Prevent C++ standard library operator new, delete and their related exception types from being exported as weak symbols. 38 OTHER_LDFLAGS_HIDE_SYMBOLS = -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,__ZNKSt3__18functionIFvvEEclEv -Wl,-unexported_symbol -Wl,__ZNSt3__18functionIFvvEEC1EOS2_ -Wl,-unexported_symbol -Wl,__ZNSt3__18functionIFvvEEC2EOS2_ -Wl,-unexported_symbol -Wl,__ZNKSt3__18functionIFvRN3JSC17BytecodeGeneratorEPNS1_10RegisterIDEEEclES3_S5_ -Wl,-unexported_symbol -Wl,__ZNSt3__18functionIFvRN3JSC17BytecodeGeneratorEPNS1_10RegisterIDEEED1Ev -Wl,-unexported_symbol -Wl,__ZNSt3__18functionIFvRN3JSC17BytecodeGeneratorEPNS1_10RegisterIDEEED2Ev -Wl,-unexported_symbol -Wl,__ZNSt3__18functionIFvvEED1Ev -Wl,-unexported_symbol -Wl,__ZNSt3__18functionIFvvEED2Ev -Wl,-unexported_symbol -Wl,__ZTVNSt3__117bad_function_callE -Wl,-all_load;38 OTHER_LDFLAGS_HIDE_SYMBOLS = -Wl,-unexported_symbol,__ZTISt9bad_alloc -Wl,-unexported_symbol,__ZTISt9exception -Wl,-unexported_symbol,__ZTSSt9bad_alloc -Wl,-unexported_symbol,__ZTSSt9exception -Wl,-unexported_symbol,__ZdlPvS_ -Wl,-unexported_symbol,__ZnwmPv -Wl,-unexported_symbol,__ZNKSt3__18functionIFvvEEclEv -Wl,-unexported_symbol,__ZNSt3__18functionIFvvEEC1EOS2_ -Wl,-unexported_symbol,__ZNSt3__18functionIFvvEEC2EOS2_ -Wl,-unexported_symbol,__ZNKSt3__18functionIFvRN3JSC17BytecodeGeneratorEPNS1_10RegisterIDEEEclES3_S5_ -Wl,-unexported_symbol,__ZNSt3__18functionIFvRN3JSC17BytecodeGeneratorEPNS1_10RegisterIDEEED1Ev -Wl,-unexported_symbol,__ZNSt3__18functionIFvRN3JSC17BytecodeGeneratorEPNS1_10RegisterIDEEED2Ev -Wl,-unexported_symbol,__ZNSt3__18functionIFvvEED1Ev -Wl,-unexported_symbol,__ZNSt3__18functionIFvvEED2Ev -Wl,-unexported_symbol,__ZTVNSt3__117bad_function_callE; 39 39 40 OTHER_LDFLAGS_BASE = -lobjc -Wl,-Y,3 $(OTHER_LDFLAGS_HIDE_SYMBOLS);40 OTHER_LDFLAGS_BASE = $(OTHER_LDFLAGS_HIDE_SYMBOLS) -force_load "$(BUILT_PRODUCTS_DIR)/DerivedSources/JavaScriptCore/libWTF.a"; 41 41 OTHER_LDFLAGS[sdk=iphone*] = $(inherited) $(OTHER_LDFLAGS_BASE); 42 OTHER_LDFLAGS[sdk=macosx*] = $(inherited) $(OTHER_LDFLAGS_BASE) - sub_library libobjc -framework CoreServices;42 OTHER_LDFLAGS[sdk=macosx*] = $(inherited) $(OTHER_LDFLAGS_BASE) -framework CoreServices; 43 43 44 44 SECTORDER_FLAGS = $(SECTORDER_FLAGS_$(CONFIGURATION)); -
trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
r229646 r229738 66 66 buildPhases = ( 67 67 65FB3F6509D11E9100F49DEB /* Generate Derived Sources */, 68 374F95C9205F9975002BF68F /* Make libWTF.a Symbolic Link */, 68 69 ); 69 70 dependencies = ( … … 4220 4221 A7FCC26C17A0B6AA00786D1A /* FTLSwitchCase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FTLSwitchCase.h; path = ftl/FTLSwitchCase.h; sourceTree = "<group>"; }; 4221 4222 A7FF647A18C52E8500B55307 /* SpillRegistersMode.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SpillRegistersMode.h; sourceTree = "<group>"; }; 4222 A8A4748D151A8306004123FF /* libWTF.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path =libWTF.a; sourceTree = BUILT_PRODUCTS_DIR; };4223 A8A4748D151A8306004123FF /* libWTF.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; name = libWTF.a; path = DerivedSources/JavaScriptCore/libWTF.a; sourceTree = BUILT_PRODUCTS_DIR; }; 4223 4224 A8E894310CD0602400367179 /* JSCallbackObjectFunctions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSCallbackObjectFunctions.h; sourceTree = "<group>"; }; 4224 4225 A8E894330CD0603F00367179 /* JSGlobalObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSGlobalObject.h; sourceTree = "<group>"; }; … … 9893 9894 shellScript = "exec ${SRCROOT}/postprocess-headers.sh"; 9894 9895 }; 9896 374F95C9205F9975002BF68F /* Make libWTF.a Symbolic Link */ = { 9897 isa = PBXShellScriptBuildPhase; 9898 buildActionMask = 2147483647; 9899 files = ( 9900 ); 9901 inputPaths = ( 9902 ); 9903 name = "Make libWTF.a Symbolic Link"; 9904 outputPaths = ( 9905 ); 9906 runOnlyForDeploymentPostprocessing = 0; 9907 shellPath = /bin/sh; 9908 shellScript = "set -e\n\nif [[ -f \"${BUILT_PRODUCTS_DIR}/libWTF.a\" ]]; then\n ln -s -f -h \"${BUILT_PRODUCTS_DIR}/libWTF.a\" \"${BUILT_PRODUCTS_DIR}/DerivedSources/JavaScriptCore/libWTF.a\"\nelse\n ln -s -f -h \"${SDK_DIR}/usr/local/lib/libWTF.a\" \"${BUILT_PRODUCTS_DIR}/DerivedSources/JavaScriptCore/libWTF.a\"\nfi"; 9909 }; 9895 9910 53B4BD091F68AF8900D2BEA3 /* Generate Unified Sources */ = { 9896 9911 isa = PBXShellScriptBuildPhase;
Note: See TracChangeset
for help on using the changeset viewer.