UpdateClang depends on GYP_DEFINES that may not be set |
||||||
Issue descriptionI think there may be something wrong with the logic in tools/clang/scripts/update.py UpdateClang() for setting need_gold_plugin. It depends on GYP_DEFINES that were not set for me. need_gold_plugin was false for me, I ended up getting errors like "BFD: ../../third_party/llvm-build/Release+Asserts/lib/LLVMgold.so: cannot open shared object file: No such file or directory" when I compiled. Perhaps somewhere something in the tool chain should have set LLVM_DOWNLOAD_GOLD_PLUGIN env var to true. For reference, my args.gn were is_chrome_branded = true is_debug = false is_official_build = true use_goma = true is_component_build = false is_clang = true issue 536159 is a good reference bug.
,
Jan 11 2017
Two things here: 1. In general, in gyp times, there was a way to run hooks depending on the gyp config. That's what this script does. Bug 570091 tracks having something like that for gn. 2. For this concrete case, since prod builds now use LTO, see https://bugs.chromium.org/p/chromium/issues/detail?id=678915#c4 I could dupe this into the first thing I mentioned, or we could leave this bug here open for 2. Not sure if we should just wait for lld for that.
,
Mar 11 2017
related: https://chromium.googlesource.com/chromium/src.git/+/57310cedbe5d558ba806b3f60f752b84e20a65eb
,
Mar 31 2017
,
Mar 31 2017
Can I reopen this? https://chromium.googlesource.com/chromium/src.git/+/57310cedbe5d558ba806b3f60f752b84e20a65eb Did not seem to work here, or was it reverted later? Only doing $ LLVM_DOWNLOAD_GOLD_PLUGIN=1 gclient sync helped.
,
Mar 31 2017
It was reverted, see review link for that revision.
,
Apr 27 2017
In case other people are searching for error messages.... When your linux official branded build fails with this message: FAILED: tls_edit tls_edit.map.gz python "../../build/toolchain/gcc_link_wrapper.py" --output="./tls_edit" --map-file "./tls_edit.map.gz" -- ../../third_party/llvm-build/Release+Asserts/bin/clang++ -Wl,--fatal-warnings -Wl,--build-id=sha1 -fPIC -Wl,-z,noexecstack -Wl,-z,now -Wl,-z,relro -Wl,-z,defs -Wl,--no-as-needed -lpthread -Wl,--as-needed -fuse-ld=gold -B../../third_party/binutils/Linux_x64/Release/bin -Wl,--threads -Wl,--thread-count=4 -Wl,--icf=all -flto -fwhole-program-vtables -Wl,-plugin-opt,O1 -Wl,-plugin-opt,-function-sections -Wl,-plugin-opt,-data-sections -m64 -pthread -Werror -Wl,-O1 -Wl,--gc-sections --sysroot=../../build/linux/debian_jessie_amd64-sysroot -L/w/chrome/src/build/linux/debian_jessie_amd64-sysroot/lib/x86_64-linux-gnu -Wl,-rpath-link=/w/chrome/src/build/linux/debian_jessie_amd64-sysroot/lib/x86_64-linux-gnu -L/w/chrome/src/build/linux/debian_jessie_amd64-sysroot/usr/lib/x86_64-linux-gnu -Wl,-rpath-link=/w/chrome/src/build/linux/debian_jessie_amd64-sysroot/usr/lib/x86_64-linux-gnu -L/w/chrome/src/build/linux/debian_jessie_amd64-sysroot/usr/lib/gcc/x86_64-linux-gnu/4.6 -Wl,-rpath-link=/w/chrome/src/build/linux/debian_jessie_amd64-sysroot/usr/lib/gcc/x86_64-linux-gnu/4.6 -L/w/chrome/src/build/linux/debian_jessie_amd64-sysroot/usr/lib -Wl,-rpath-link=/w/chrome/src/build/linux/debian_jessie_amd64-sysroot/usr/lib -fsanitize=cfi-vcall -Wl,-rpath-link=. -Wl,--disable-new-dtags -o "./tls_edit" -Wl,--start-group @"./tls_edit.rsp" -Wl,--end-group -ldl -lrt ../../third_party/binutils/Linux_x64/Release/bin/ld.gold: error: /w/chrome/src/third_party/llvm-build/Release+Asserts/bin/../lib/LLVMgold.so: could not load plugin library: /w/chrome/src/third_party/llvm-build/Release+Asserts/bin/../lib/LLVMgold.so: cannot open shared object file: No such file or directory ../../third_party/binutils/Linux_x64/Release/bin/ld.gold: error: obj/native_client/src/tools/tls_edit/tls_edit/tls_edit.o:1:3: invalid character ../../third_party/binutils/Linux_x64/Release/bin/ld.gold: error: obj/native_client/src/tools/tls_edit/tls_edit/tls_edit.o:1:3: syntax error, unexpected $end ../../third_party/binutils/Linux_x64/Release/bin/ld.gold: error: obj/native_client/src/tools/tls_edit/tls_edit/tls_edit.o: not an object or archive ../../build/linux/debian_jessie_amd64-sysroot/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/crt1.o(.text+0x20): error: undefined reference to 'main' clang: error: linker command failed with exit code 1 (use -v to see invocation) The workaround from #5 is: LLVM_DOWNLOAD_GOLD_PLUGIN=1 gclient sync and rebuild
,
Apr 27 2018
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Aug 3
This bug has an owner, thus, it's been triaged. Changing status to "assigned".
,
Aug 14
|
||||||
►
Sign in to add a comment |
||||||
Comment 1 by bpastene@chromium.org
, Jan 11 2017Owner: thakis@chromium.org
Status: Assigned (was: Untriaged)