FS#58072 - [chromium] Disable build-id creation during linking
Attached to Project:
Arch Linux
Opened by xsmile (xsmile) - Monday, 02 April 2018, 14:20 GMT
Last edited by Evangelos Foutras (foutrelis) - Tuesday, 03 April 2018, 05:02 GMT
Opened by xsmile (xsmile) - Monday, 02 April 2018, 14:20 GMT
Last edited by Evangelos Foutras (foutrelis) - Tuesday, 03 April 2018, 05:02 GMT
|
Details
Description:
The GN build flag 'is_official_build' causes the linker to create a build ID using SHA1 which slows down the linking process. Relevant part in build/config/compiler/BUILD.gn [1]: if (is_official_build) { # Explicitly pass --build-id to ld. Compilers used to always pass this # implicitly but don't any more (in particular clang when built without # ENABLE_LINKER_BUILD_ID=ON). The crash infrastructure does need a build # id, so explicitly enable it in official builds. It's not needed in # unofficial builds and computing it does slow down the link, so go with # faster links in unofficial builds. ldflags += [ "-Wl,--build-id=sha1" ] } As the crash infrastructure is not utilized, the build ID can be omitted to speed up linking. Additional info: * package version: chromium 65.0.3325.181-5 Steps to reproduce: --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn @@ -316,7 +316,7 @@ config("compiler") { } } - if (is_official_build) { + if (false) { # Explicitly pass --build-id to ld. Compilers used to always pass this # implicitly but don't any more (in particular clang when built without # ENABLE_LINKER_BUILD_ID=ON). The crash infrastructure does need a build 1: https://chromium.googlesource.com/chromium/src/+/65.0.3325.181/build/config/compiler/BUILD.gn#317 |
This task depends upon
Closed by Evangelos Foutras (foutrelis)
Tuesday, 03 April 2018, 05:02 GMT
Reason for closing: Won't implement
Additional comments about closing: Build id computation appears to take less than a second.
Tuesday, 03 April 2018, 05:02 GMT
Reason for closing: Won't implement
Additional comments about closing: Build id computation appears to take less than a second.
It's really not worth the effort to remove --build-id even if it's of no use currently.
Thanks for the tests.
Cheers for looking out though. :)