2016-04-16 15:03:45 +08:00
|
|
|
@LIT_SITE_CFG_IN_HEADER@
|
|
|
|
|
2013-06-06 21:28:37 +08:00
|
|
|
# Tool-specific config options.
|
[ubsan] Re-commit: 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.
The original attempt, r319525 was reverted in r319526 due
to the failures in compiler-rt standalone builds.
Reviewers: eugenis, vitalybuka
Reviewed By: eugenis
Subscribers: #sanitizers, pcc, kubamracek, mgorny, llvm-commits, mehdi_amini, inglorion, kcc
Differential Revision: https://reviews.llvm.org/D39508
llvm-svn: 319575
2017-12-02 03:36:29 +08:00
|
|
|
config.name_suffix = "@CONFIG_NAME@"
|
2014-02-18 16:56:49 +08:00
|
|
|
config.ubsan_lit_test_mode = "@UBSAN_LIT_TEST_MODE@"
|
2015-02-27 03:19:44 +08:00
|
|
|
config.target_cflags = "@UBSAN_TEST_TARGET_CFLAGS@"
|
|
|
|
config.target_arch = "@UBSAN_TEST_TARGET_ARCH@"
|
[ubsan] Re-commit: 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.
The original attempt, r319525 was reverted in r319526 due
to the failures in compiler-rt standalone builds.
Reviewers: eugenis, vitalybuka
Reviewed By: eugenis
Subscribers: #sanitizers, pcc, kubamracek, mgorny, llvm-commits, mehdi_amini, inglorion, kcc
Differential Revision: https://reviews.llvm.org/D39508
llvm-svn: 319575
2017-12-02 03:36:29 +08:00
|
|
|
config.use_lld = @UBSAN_TEST_USE_LLD@
|
|
|
|
config.use_thinlto = @UBSAN_TEST_USE_THINLTO@
|
2013-05-20 19:13:33 +08:00
|
|
|
|
2016-02-23 09:34:17 +08:00
|
|
|
# Load common config for all compiler-rt lit tests.
|
|
|
|
lit_config.load_config(config, "@COMPILER_RT_BINARY_DIR@/test/lit.common.configured")
|
|
|
|
|
2013-06-06 21:28:37 +08:00
|
|
|
# Load tool-specific config that would do the real work.
|
2014-02-18 16:56:49 +08:00
|
|
|
lit_config.load_config(config, "@UBSAN_LIT_TESTS_DIR@/lit.common.cfg")
|