[PATCH] D76240: [Sanitizers][Test] If the default linker is LLD, disable threads
Nemanja Ivanovic via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 16 11:27:45 PDT 2020
nemanjai created this revision.
nemanjai added reviewers: kcc, eugenis, dvyukov, samsonov, PowerPC.
Herald added a project: Sanitizers.
Herald added a subscriber: Sanitizers.
When running `ninja check-all` on a platform that includes sanitizer tests and the default linker is LLD, the machine can easily be overwhelmed if threads are not disabled in the linker. This is because LLD uses effectively unrestricted parallelism and `llvm-lit` will use as many processes as there are virtual CPUs on the system.
Of course, this issue can be worked around by specifying a lower number of threads to `llvm-lit`, but that has the undesired effect of reducing parallelism for the entire test run.
This patch therefore adds `-Wl,--no-threads` to the `cflags` for invocations of `clang` in the sanitizers.
Please keep in mind that this is not at all my area of expertise so if there is a better/simpler/cleaner way to accomplish this, please suggest one.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D76240
Files:
compiler-rt/test/asan/TestCases/Linux/global-overflow-bfd.cpp
compiler-rt/test/asan/lit.cfg.py
compiler-rt/test/lit.common.configured.in
compiler-rt/test/lsan/lit.common.cfg.py
compiler-rt/test/msan/lit.cfg.py
compiler-rt/test/tsan/lit.cfg.py
compiler-rt/test/ubsan/lit.common.cfg.py
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76240.250598.patch
Type: text/x-patch
Size: 5354 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200316/c8a2c1ef/attachment.bin>
More information about the llvm-commits
mailing list