aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode
diff options
context:
space:
mode:
authorRainer Orth <ro@gcc.gnu.org>2023-09-01 21:42:05 +0200
committerRainer Orth <ro@gcc.gnu.org>2023-09-01 21:42:05 +0200
commitd39a9e3b4d4afc0321fea72b9d6b8a3908c45fc1 (patch)
tree3eaed0f510b68fb4832b7a8dd50265a509b02265 /llvm/lib/Bitcode
parentf9f2fdcf03d9a64741e24a5d480842551163ef4d (diff)
downloadllvm-d39a9e3b4d4afc0321fea72b9d6b8a3908c45fc1.zip
llvm-d39a9e3b4d4afc0321fea72b9d6b8a3908c45fc1.tar.gz
llvm-d39a9e3b4d4afc0321fea72b9d6b8a3908c45fc1.tar.bz2
[Driver] Support GNU ld on Solaris
This patch supports GNU ld on Solaris in addition to Solaris ld, the default. - Linker selection is dynamic: one can switch between Solaris ld and GNU ld at runtime, with the default selectable with `-DCLANG_DEFAULT_LINKER`. - Testcases have been adjusted to test both variants in case there are differences. - The `compiler-rt/cmake/config-ix.cmake` and `llvm/cmake/modules/AddLLVM.cmake` changes to restrict the tests to Solaris ld are necessary because GNU accepts unknown `-z` options, but warns every time they are used, creating a lot of noise. Since there seems to be no way to check for those warnings in `llvm_check_compiler_linker_flag` or `llvm_check_compiler_linker_flag`, I restrict the cmake tests to Solaris ld in the first place. - The changes to `clang/test/Driver/hip-link-bundle-archive.hip` and `flang/test/Driver/linker-flags.f90` are required when LLVM is built with `-DCLANG_DEFAULT_LINKER=gld` on Solaris: `MSVC.cpp` `visualstudio::Linker::ConstructJob` ultimately calls `GetProgramPath("gld")`, resulting in a search for `gld`, which exists in `/usr/bin/gld` on Solaris. With `-fuse-ld=`, this doesn't happen and the expected `link` is returned. - `compiler-rt/test/asan/TestCases/global-location-nodebug.cpp` needs to enforce the Solaris ld, otherwise the test would `XPASS` with GNU ld which has the `-S` semantics expected by the test. Tested on `amd64-pc-solaris2.11` and `sparcv9-sun-solaris2.11` with both `-DCLANG_DEFAULT_LINKER=gld` and the default, and `x86_64-pc-linux-gnu`. No regressions in either case. Differential Revision: https://reviews.llvm.org/D85309
Diffstat (limited to 'llvm/lib/Bitcode')
0 files changed, 0 insertions, 0 deletions