Different host x64 link flags for android target_cpu="arm" vs "x64" |
||
Issue descriptionOS: Android What steps will reproduce the problem? gn gen --args='target_os="android" is_debug=false is_official_build=true is_chrome_branded=true target_cpu="x64"' out/Default ninja -C out/Default clang_x64/bro What is the expected output? It should build What do you see instead? ../../third_party/binutils/Linux_x64/Release/bin/ld.gold: error: /b/build/slave/official-x86_64/build/src/third_party/llvm-build/Release+Asserts/bin/../lib/LLVMgold.so: could not load plugin library: /b/build/slave/official-x86_64/build/src/third_party/llvm-build/Release+Asserts/bin/../lib/LLVMgold.so: cannot open shared object file: No such file or directory It looks like there are a few issues here: 1) The linker command has "-flto" for x64, but not for other arches. target_cpu for target_os="android" should not affect flags for host_toolchain. 2) The gold plugin is not present. Looks like for it to be downloaded still relies on GYP_DEFINES: https://code.google.com/p/chromium/codesearch#chromium/src/tools/clang/scripts/update.py&q=download_gold_plugin&sq=package:chromium&dr=C&l=379 3) Why does this break when building "bro" but not for existing host binaries (md5sum, ijar, etc) Please use labels and text to provide additional information.
,
May 26 2016
Looks like 3) is wrong. It did break for all other targets.
,
May 26 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/c8648b6aef59bf539251dc5242820a83b1a751f9 commit c8648b6aef59bf539251dc5242820a83b1a751f9 Author: agrieve <agrieve@chromium.org> Date: Thu May 26 15:43:55 2016 Reland of Enable LTO on Linux for the official builds. Reason for reland: Uses target_os rather than is_linux This CL turns on Link-Time Optimization for official builds, which makes the resulting binaries to run faster. On the dark side, the change increases the link time by 3x-5x, and is also very memory-hungry. All official bots were upgraded to have 200+ GB RAM to handle LTO builds. Timeouts were also accordingly increased. This CL might cause timeouts / OOMs, if some slaves still have not enough RAM. Please, revert the CL with pointing out to the slaves / bots broken by this change. NOTRY=true TBR=thakis BUG= 453195 , 615039 Review-Url: https://codereview.chromium.org/2017633002 Cr-Commit-Position: refs/heads/master@{#396186} [modify] https://crrev.com/c8648b6aef59bf539251dc5242820a83b1a751f9/build/common.gypi [modify] https://crrev.com/c8648b6aef59bf539251dc5242820a83b1a751f9/build/toolchain/toolchain.gni
,
May 27 2016
Tried to address 2) in https://codereview.chromium.org/2011023002/, but looks like it's working-as-intended (you need to manually download the gold plugin if you want to use it).
,
Apr 18 2017
Note to developers who might be as confused as I was: if you need to manually download the gold plugin as said previously, it is as simple as running in src directory: python ./build/download_gold_plugin.py (Tested on Ubuntu 16.04) |
||
►
Sign in to add a comment |
||
Comment 1 by bugdroid1@chromium.org
, May 26 2016