RESOLVED FIXED 141912
Weak symbol warning when linking TestWebKitAPI
https://bugs.webkit.org/show_bug.cgi?id=141912
Summary Weak symbol warning when linking TestWebKitAPI
Brian Burg
Reported 2015-02-23 10:20:21 PST
I started noticing this issue a while ago, I think it was before the full switch away from WebCore.exp.in but I'm not sure. I have done several full builds since then IIRC. Full output as follows: === BUILD TARGET TestWebKitAPI OF PROJECT TestWebKitAPI WITH CONFIGURATION Release === Check dependencies DebugRelease.xcconfig line 23: Unable to find included file "../../../../Internal/Configurations/HaveInternalSDK.xcconfig" Ld /Users/burg/repos/replay-staging/OpenSource/WebKitBuild/Release/TestWebKitAPI normal x86_64 cd /Users/burg/repos/replay-staging/OpenSource/Tools/TestWebKitAPI export MACOSX_DEPLOYMENT_TARGET=10.10 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -L/Users/burg/repos/replay-staging/OpenSource/WebKitBuild/Release -F/Users/burg/repos/replay-staging/OpenSource/WebKitBuild/Release -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks/Quartz.framework/Frameworks -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks/ApplicationServices.framework/Frameworks -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks/CoreServices.framework/Frameworks -filelist /Users/burg/repos/replay-staging/OpenSource/WebKitBuild/TestWebKitAPI.build/Release/TestWebKitAPI.build/Objects-normal/x86_64/TestWebKitAPI.LinkFileList -Xlinker --no-demangle -mmacosx-version-min=10.10 -lgtest -force_load /Users/burg/repos/replay-staging/OpenSource/WebKitBuild/Release/libTestWebKitAPI.a -framework JavaScriptCore -framework WebKit -framework WebKit2 -framework Cocoa -framework Carbon -stdlib=libc++ -fobjc-link-runtime -Xlinker -dependency_info -Xlinker /Users/burg/repos/replay-staging/OpenSource/WebKitBuild/TestWebKitAPI.build/Release/TestWebKitAPI.build/Objects-normal/x86_64/TestWebKitAPI_dependency_info.dat -o /Users/burg/repos/replay-staging/OpenSource/WebKitBuild/Release/TestWebKitAPI ld: warning: direct access in __GLOBAL__I_a to global weak symbol __ZN7testing4Test13SetUpTestCaseEv means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings. ld: warning: direct access in __GLOBAL__I_a to global weak symbol __ZN7testing4Test16TearDownTestCaseEv means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
Attachments
Patch (1.17 KB, patch)
2015-03-04 16:05 PST, Alex Christensen
no flags
Patch (1.71 KB, patch)
2015-03-05 12:37 PST, Alex Christensen
no flags
Alex Christensen
Comment 1 2015-02-23 12:10:25 PST
I'm pretty sure that I did indeed cause this when I switched away from WebCore.exp.in. This doesn't seem to be breaking any builds, but this should be fixed along with the final cleaning up from that switch.
Alex Christensen
Comment 2 2015-03-04 16:05:45 PST
David Kilzer (:ddkilzer)
Comment 3 2015-03-04 16:33:42 PST
Comment on attachment 247907 [details] Patch r=me
WebKit Commit Bot
Comment 4 2015-03-04 17:19:06 PST
Comment on attachment 247907 [details] Patch Clearing flags on attachment: 247907 Committed r181054: <http://trac.webkit.org/changeset/181054>
WebKit Commit Bot
Comment 5 2015-03-04 17:19:10 PST
All reviewed patches have been landed. Closing bug.
WebKit Commit Bot
Comment 6 2015-03-04 18:31:17 PST
Re-opened since this is blocked by bug 142320
Alex Christensen
Comment 7 2015-03-05 12:37:38 PST
Alex Christensen
Comment 8 2015-03-05 12:38:45 PST
The previous patch broke some API tests even though it compiled correctly. I'm honestly not sure why. This patch compiles correctly and doesn't break run-api-tests.
David Kilzer (:ddkilzer)
Comment 9 2015-03-05 15:44:00 PST
Comment on attachment 247978 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=247978&action=review r=me > Tools/TestWebKitAPI/Configurations/TestWebKitAPI.xcconfig:27 > +UNEXPORTED_SYMBOL_LDFLAGS = -Wl,-unexported_symbol -Wl,__ZN7testing4Test16TearDownTestCaseEv -Wl,-unexported_symbol -Wl,__ZN7testing4Test13SetUpTestCaseEv If we have to add more of these symbols in the future, we should put them in an *.unexp file. This is slightly ugly to maintain.
WebKit Commit Bot
Comment 10 2015-03-05 16:29:50 PST
Comment on attachment 247978 [details] Patch Clearing flags on attachment: 247978 Committed r181113: <http://trac.webkit.org/changeset/181113>
WebKit Commit Bot
Comment 11 2015-03-05 16:29:55 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.