[all-commits] [llvm/llvm-project] 430c49: [compiler-rt] [test] Fix using toolchains that rel...
Martin Storsjö via All-commits
all-commits at lists.llvm.org
Fri Nov 15 00:18:59 PST 2024
Branch: refs/heads/release/19.x
Home: https://github.com/llvm/llvm-project
Commit: 430c4952286f11a19dea9ad1881792442370470d
https://github.com/llvm/llvm-project/commit/430c4952286f11a19dea9ad1881792442370470d
Author: Martin Storsjö <martin at martin.st>
Date: 2024-11-15 (Fri, 15 Nov 2024)
Changed paths:
M compiler-rt/CMakeLists.txt
M compiler-rt/test/CMakeLists.txt
M compiler-rt/test/lit.common.cfg.py
M compiler-rt/test/lit.common.configured.in
Log Message:
-----------
[compiler-rt] [test] Fix using toolchains that rely on Clang default configs (#113491)
The use of CLANG_NO_DEFAULT_CONFIG in the tests was added because some
Linux distributions had a global default config file, that added flags
relating to hardening, which interfere with the sanitizer tests. By
setting CLANG_NO_DEFAULT_CONFIG, the global default config files that
are found are ignored, and the sanitizers get the expected default
compiler behaviour.
(This was https://github.com/llvm/llvm-project/issues/60394, which was
fixed in 8ab762557fb057af1a3015211ee116a975027e78.)
However, some toolchains may rely on default config files for mandatory
parts required for functioning at all - setting things like sysroots,
-rtlib, -unwindlib, -stdlib, -fuse-ld etc. In such a case we can't
forcibly disable any default config, because it will break the otherwise
working toolchain.
Add a test for whether the compiler works while passing
--no-default-config to it. If the option is accepted and the toolchain
still works while that is set, set CLANG_NO_DEFAULT_CONFIG while running
tests.
(This adds a little bit of inconsistency, as we're testing for the
command line option, while using the environment variable. However doing
compile testing with an environment variable isn't quite as easily
doable, and passing an extra command line flag to all compile commands
while testing, is a bit clumsy - therefore this inconsistency.)
(cherry picked from commit a14a83d9a102253eca7c02ff4c35a2ce3f7de6e5)
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list