[PATCH] D115045: [Clang] Ignore CLANG_DEFAULT_LINKER for custom-linker toolchains

Simon Moll via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 6 07:47:25 PST 2021


simoll reopened this revision.
simoll added a comment.
This revision is now accepted and ready to land.

I've reverted the patch for now, this may show up for other toolchains, too.

This patch has pushed down the responsibility for handling `-DCLANG_DEFAULT_LINKER` to the toolchains.
However, I did not modify all toolchains to account for that. Pending an update..

In D115045#3173520 <https://reviews.llvm.org/D115045#3173520>, @ronlieb wrote:

> Hi Simon,
> i am seeing a failure in our amdgpu buildbot after this patch . https://lab.llvm.org/staging/#/builders/200/builds/1407
> we do depend on the cmake flag you removed.
> we specify this
>  -DCLANG_DEFAULT_LINKER=lld
>
> FAILED: openmp/libomptarget/libomptarget.rtl.x86_64.so
> : && /home/rlieberm/mono-repo/llvm-project/build/./bin/clang++ --target=x86_64-unknown-linux-gnu -fPIC -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wno-comment -Wstring-conversion -Wmisleading-indentation -fdiagnostics-color -ffunction-sections -fdata-sections -Wall -Wcast-qual -Wformat-pedantic -Wimplicit-fallthrough -Wsign-compare -Wno-extra -Wno-pedantic -std=c++14 -O3 -DNDEBUG  -Wl,-z,defs -Wl,-z,nodelete -Wl,--color-diagnostics -shared -Wl,-soname,libomptarget.rtl.x86_64.so -o openmp/libomptarget/libomptarget.rtl.x86_64.so openmp/libomptarget/plugins/common/elf_common/CMakeFiles/elf_common.dir/elf_common.cpp.o openmp/libomptarget/plugins/x86_64/CMakeFiles/omptarget.rtl.x86_64.dir/__/generic-elf-64bit/src/rtl.cpp.o  /usr/lib/x86_64-linux-gnu/libffi.so  /usr/lib/x86_64-linux-gnu/libelf.so  -ldl  -lpthread  -Wl,--version-script=/home/rlieberm/mono-repo/llvm-project/openmp/libomptarget/plugins/x86_64/../exports  /home/rlieberm/mono-repo/llvm-project/build/lib/libLLVMObject.a  /home/rlieberm/mono-repo/llvm-project/build/lib/libLLVMBitReader.a  /home/rlieberm/mono-repo/llvm-project/build/lib/libLLVMCore.a  /home/rlieberm/mono-repo/llvm-project/build/lib/libLLVMRemarks.a  /home/rlieberm/mono-repo/llvm-project/build/lib/libLLVMBitstreamReader.a  /home/rlieberm/mono-repo/llvm-project/build/lib/libLLVMMCParser.a  /home/rlieberm/mono-repo/llvm-project/build/lib/libLLVMMC.a  /home/rlieberm/mono-repo/llvm-project/build/lib/libLLVMDebugInfoCodeView.a  /home/rlieberm/mono-repo/llvm-project/build/lib/libLLVMTextAPI.a  /home/rlieberm/mono-repo/llvm-project/build/lib/libLLVMBinaryFormat.a  /home/rlieberm/mono-repo/llvm-project/build/lib/libLLVMSupport.a  -lrt  -lm  /usr/lib/x86_64-linux-gnu/libz.so  /usr/lib/x86_64-linux-gnu/libtinfo.so  /home/rlieberm/mono-repo/llvm-project/build/lib/libLLVMDemangle.a  -ldl  -lpthread && :
> lld is a generic driver.
> Invoke ld.lld (Unix), ld64.lld (macOS), lld-link (Windows), wasm-ld (WebAssembly) instead
> clang-14: error: linker command failed with exit code 1 (use -v to see invocation)




Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D115045/new/

https://reviews.llvm.org/D115045



More information about the cfe-commits mailing list