llvm-project/llvm/utils/lit/lit
Rainer Orth f59bec7acb [clang][Driver] Default to /usr/bin/ld on Solaris
`clang` currently requires the native linker on Solaris:

  - It passes `-C` to `ld` which GNU `ld` doesn't understand.

  - To use `gld`, one needs to pass the correct `-m EMU` option to select
    the right emulation.  Solaris `ld` cannot handle that option.

So far I've worked around this by passing `-DCLANG_DEFAULT_LINKER=/usr/bin/ld`
to `cmake`.  However, if someone forgets this, it depends on the user's
`PATH` whether or not `clang` finds the correct linker, which doesn't make
for a good user experience.

While it would be nice to detect the linker flavor at runtime, this is more
involved.  Instead, this patch defaults to `/usr/bin/ld` on Solaris.  This
doesn't work on its own, however: a link fails with

  clang-12: error: unable to execute command: Executable "x86_64-pc-solaris2.11-/usr/bin/ld" doesn't exist!

I avoid this by leaving absolute paths alone in `ToolChain::GetLinkerPath`.

Tested on `amd64-pc-solaris2.11`, `sparcv9-sun-solaris2.11`, and
`x86_64-pc-linux-gnu`.

Differential Revision: https://reviews.llvm.org/D84029
2020-08-13 22:42:58 +02:00
..
ExampleTests.ObjDir
builtin_commands [lit] Fix internal diff newlines for -w/-b 2019-12-17 10:49:34 -05:00
formats [flang] Run non-gtest unit tests with lit. 2020-07-24 14:49:39 +01:00
llvm [clang][Driver] Default to /usr/bin/ld on Solaris 2020-08-13 22:42:58 +02:00
BooleanExpression.py [lit] Add an option to print all features used in tests 2020-05-29 07:00:05 -04:00
LitConfig.py [lit] Move the recursiveExpansionLimit setting to TestingConfig 2020-04-06 13:58:00 -04:00
LitTestCase.py [lit] Small cleanups. NFCI 2019-12-13 17:00:04 -08:00
ProgressBar.py [lit] Attempt to print test summary on CTRL+C 2019-11-22 10:57:33 -08:00
ShCommands.py
ShUtil.py
Test.py [lit] Add --time-trace-output to lit 2020-08-04 14:25:23 +01:00
TestRunner.py [lit] Don't expand escapes until all substitutions have been applied 2020-07-27 18:09:00 +03:00
TestingConfig.py [Lit] Pass through SSH_AUTH_SOCK from the surrounding environment 2020-06-12 13:59:29 -04:00
__init__.py Bump the trunk major version to 12 2020-07-15 12:05:05 +02:00
cl_arguments.py [lit] Add --time-trace-output to lit 2020-08-04 14:25:23 +01:00
discovery.py Revert "[lit] Keep original cfg file case around." 2020-04-15 17:19:39 -04:00
display.py [lit] Prevent hang when lit sees non-ASCII characters 2020-07-14 18:41:15 +01:00
main.py [lit] Don't include tests skipped due to sharding in reports 2020-07-26 11:39:22 +01:00
reports.py [lit] Remove ANSI control characters from xunit output 2020-08-06 09:16:52 +01:00
run.py [lit] Only update specific fields from remote test object 2020-05-01 17:03:54 -07:00
util.py Remove a function that has been dead since r313889. 2020-04-15 12:02:30 -04:00
worker.py [lit] Add --time-trace-output to lit 2020-08-04 14:25:23 +01:00