Bug 186952

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

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.