Bug 186949

Summary: Adjust UNEXPORTED_SYMBOL_LDFLAGS for LTO
Product: WebKit Reporter: Keith Rollin <krollin>
Component: WebCore Misc.Assignee: Keith Rollin <krollin>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, commit-queue, ddkilzer, ews-watchlist, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Archive of layout-test-results from ews200 for win-future none

Keith Rollin
Reported 2018-06-22 16:27:49 PDT
When building with LTO, WebKit's 'check-for-weak-vtables-and-externals' script reports weak external symbols: ERROR: WebKit has a weak external symbol in it (.../OpenSource/WebKitBuild/Release/WebKit.framework/Versions/A/WebKit) ERROR: A weak external symbol is generated when a symbol is defined in multiple compilation units and is also marked as being exported from the library. ERROR: A common cause of weak external symbols is when an inline function is listed in the linker export file. ERROR: symbol __ZTCNSt3__118basic_stringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEE0_NS_13basic_istreamIcS2_EE ERROR: symbol __ZTCNSt3__118basic_stringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEE0_NS_14basic_iostreamIcS2_EE ERROR: symbol __ZTCNSt3__118basic_stringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEE16_NS_13basic_ostreamIcS2_EE ERROR: symbol __ZTTNSt3__118basic_stringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEE ERROR: symbol __ZTVNSt3__115basic_stringbufIcNS_11char_traitsIcEENS_9allocatorIcEEEE ERROR: symbol __ZTVNSt3__118basic_stringstreamIcNS_11char_traitsIcEENS_9allocatorIcEEEE Command /bin/sh failed with exit code 1 Address these by adding those symbols to UNEXPORTED_SYMBOL_LDFLAGS in WebKit.xcconfig.
Attachments
Patch (6.68 KB, patch)
2018-06-22 17:01 PDT, Keith Rollin
no flags
Archive of layout-test-results from ews200 for win-future (12.93 MB, application/zip)
2018-06-23 08:15 PDT, EWS Watchlist
no flags
Radar WebKit Bug Importer
Comment 1 2018-06-22 16:28:00 PDT
Keith Rollin
Comment 2 2018-06-22 17:01:13 PDT
EWS Watchlist
Comment 3 2018-06-23 08:15:30 PDT
Comment on attachment 343398 [details] Patch Attachment 343398 [details] did not pass win-ews (win): Output: https://webkit-queues.webkit.org/results/8304706 New failing tests: http/tests/security/canvas-remote-read-remote-video-blocked-no-crossorigin.html
EWS Watchlist
Comment 4 2018-06-23 08:15:42 PDT
Created attachment 343435 [details] Archive of layout-test-results from ews200 for win-future The attached test failures were seen while running run-webkit-tests on the win-ews. Bot: ews200 Port: win-future Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Keith Rollin
Comment 5 2018-06-25 10:32:44 PDT
This patch affects a *Mac build*, and can't affect a *Windows layout test*.
David Kilzer (:ddkilzer)
Comment 6 2018-06-25 12:41:50 PDT
Comment on attachment 343398 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=343398&action=review r=me > Source/WebKit/Configurations/WebKit.xcconfig:118 > +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__18functionIFvN7WebCore12PolicyActionEEED1Ev -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_traitsIcEENS_9allocatorIcEEEE8_NS_13basic_ostreamIcS2_EE; In the future, this should really be moved to a *.unexp file like was done in WebCore; makes maintenance MUCH easier: Source/WebCore/Configurations/WebCore.unexp
WebKit Commit Bot
Comment 7 2018-06-25 13:16:11 PDT
Comment on attachment 343398 [details] Patch Clearing flags on attachment: 343398 Committed r233168: <https://trac.webkit.org/changeset/233168>
WebKit Commit Bot
Comment 8 2018-06-25 13:16:12 PDT
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.