summaryrefslogtreecommitdiff
path: root/test/lit.common.configured.in
diff options
context:
space:
mode:
authorRoman Lebedev <lebedev.ri@gmail.com>2017-12-01 08:38:25 +0000
committerRoman Lebedev <lebedev.ri@gmail.com>2017-12-01 08:38:25 +0000
commit9f5847984a6b837659968320e6d624a2ff94f609 (patch)
treebd7a0315eb6631736f9ffc793c26e6bbed7a0327 /test/lit.common.configured.in
parent3594ba8e72446d36d259f2c4d923e5e67db1c7a8 (diff)
[ubsan] lit changes for lld testing, future lto testing.
Summary: As discussed in https://github.com/google/oss-fuzz/issues/933, it would be really awesome to be able to use ThinLTO for fuzzing. However, as @kcc has pointed out, it is currently undefined (untested) whether the sanitizers actually function properly with LLD and/or LTO. This patch is inspired by the cfi test, which already do test with LTO (and/or LLD), since LTO is required for CFI to function. I started with UBSan, because it's cmakelists / lit.* files appeared to be the cleanest. This patch adds the infrastructure to easily add LLD and/or LTO sub-variants of the existing lit test configurations. Also, this patch adds the LLD flavor, that explicitly does use LLD to link. The check-ubsan does pass on my machine. And to minimize the [initial] potential buildbot breakage i have put some restrictions on this flavour. Please review carefully, i have not worked with lit/sanitizer tests before. Reviewers: eugenis, vitalybuka Reviewed By: eugenis Subscribers: #sanitizers, pcc, kubamracek, mgorny, llvm-commits, mehdi_amini, inglorion, kcc Differential Revision: https://reviews.llvm.org/D39508 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@319525 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/lit.common.configured.in')
-rw-r--r--test/lit.common.configured.in1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/lit.common.configured.in b/test/lit.common.configured.in
index e2da4cc9b..32a88200b 100644
--- a/test/lit.common.configured.in
+++ b/test/lit.common.configured.in
@@ -33,6 +33,7 @@ set_default("has_lld", @COMPILER_RT_HAS_LLD_PYBOOL@)
set_default("can_symbolize", @CAN_SYMBOLIZE@)
set_default("use_lld", False)
set_default("use_thinlto", False)
+set_default("use_lto", config.use_thinlto)
set_default("android", @ANDROID_PYBOOL@)
config.available_features.add('target-is-%s' % config.target_arch)