aboutsummaryrefslogtreecommitdiff
path: root/flang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2024-10-24 23:45:14 +0300
committerGitHub <noreply@github.com>2024-10-24 23:45:14 +0300
commita14a83d9a102253eca7c02ff4c35a2ce3f7de6e5 (patch)
tree3bcffcde02d6a4ba0bb86cdddacd2c3c11f6f95d /flang/lib/Frontend/CompilerInvocation.cpp
parent59b6c1b2d5290c40f59d2820b5144e2dec731635 (diff)
downloadllvm-a14a83d9a102253eca7c02ff4c35a2ce3f7de6e5.zip
llvm-a14a83d9a102253eca7c02ff4c35a2ce3f7de6e5.tar.gz
llvm-a14a83d9a102253eca7c02ff4c35a2ce3f7de6e5.tar.bz2
[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.)
Diffstat (limited to 'flang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions