Bug 186952 - Adjust webrtc library for LTO
Summary: Adjust webrtc library for LTO
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Keith Rollin
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2018-06-22 17:15 PDT by Keith Rollin
Modified: 2018-06-25 10:40 PDT (History)
7 users (show)

See Also:


Attachments
Patch (3.73 KB, patch)
2018-06-22 18:20 PDT, Keith Rollin
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from ews202 for win-future (12.85 MB, application/zip)
2018-06-23 19:44 PDT, EWS Watchlist
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Keith Rollin 2018-06-22 17:15:13 PDT
There are a number of files in webrtc that have main() functions (in particular, rtpcat.cc and click_annotate.cc). When compiling with LTO, these symbols are exposed to each other, leading to the following build failure:

Ld libwebrtc.dylib
duplicate symbol _main in:
ld: 1 duplicate symbol for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
** BUILD FAILED **

Address this by removing the indicated files from the build.
Comment 1 Radar WebKit Bug Importer 2018-06-22 17:15:29 PDT
<rdar://problem/41387815>
Comment 2 youenn fablet 2018-06-22 17:36:44 PDT
For now, we should just stop compiling these files.
They were included to be able to run some libwebrtc tests IIRC but we are not yet running them anyway.
Comment 3 Keith Rollin 2018-06-22 18:20:52 PDT
Created attachment 343407 [details]
Patch
Comment 4 Keith Rollin 2018-06-22 18:23:05 PDT
Youenn, I'd gone ahead and removed the files before I saw your comment. If you really want them included in the project but disabled, let me know.
Comment 5 EWS Watchlist 2018-06-23 19:43:58 PDT
Comment on attachment 343407 [details]
Patch

Attachment 343407 [details] did not pass win-ews (win):
Output: https://webkit-queues.webkit.org/results/8309105

New failing tests:
http/tests/security/contentSecurityPolicy/userAgentShadowDOM/allow-audio.html
Comment 6 EWS Watchlist 2018-06-23 19:44:10 PDT
Created attachment 343462 [details]
Archive of layout-test-results from ews202 for win-future

The attached test failures were seen while running run-webkit-tests on the win-ews.
Bot: ews202  Port: win-future  Platform: CYGWIN_NT-6.1-2.9.0-0.318-5-3-x86_64-64bit
Comment 7 WebKit Commit Bot 2018-06-25 10:40:05 PDT
Comment on attachment 343407 [details]
Patch

Clearing flags on attachment: 343407

Committed r233155: <https://trac.webkit.org/changeset/233155>
Comment 8 WebKit Commit Bot 2018-06-25 10:40:07 PDT
All reviewed patches have been landed.  Closing bug.