File tree Expand file tree Collapse file tree 4 files changed +7
-1
lines changed
compiler-rt/test/ubsan_minimal Expand file tree Collapse file tree 4 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,8 @@ foreach(arch ${UBSAN_TEST_ARCH})
1313 string (TOLOWER "-${arch} -${OS_NAME} " UBSAN_TEST_CONFIG_SUFFIX)
1414 get_test_cc_for_arch(${arch} UBSAN_TEST_TARGET_CC UBSAN_TEST_TARGET_CFLAGS)
1515 set (CONFIG_NAME ${arch} )
16+ set (UBSAN_TEST_HAS_CFI ${arch} IN_LIST CFI_SUPPORTED_ARCH)
17+ pythonize_bool(UBSAN_TEST_HAS_CFI)
1618 configure_lit_site_cfg(
1719 ${CMAKE_CURRENT_SOURCE_DIR} /lit.site.cfg.py.in
1820 ${CMAKE_CURRENT_BINARY_DIR} /${CONFIG_NAME} /lit.site.cfg.py)
Original file line number Diff line number Diff line change 11// RUN: %clang -fsanitize=cfi-icall -fno-sanitize-trap=cfi-icall -fuse-ld=lld -flto -fvisibility=hidden %s -o %t && not --crash %run %t 2>&1 | FileCheck %s
22// RUN: %clang -fsanitize=cfi-icall -fno-sanitize-trap=cfi-icall -fsanitize-recover=cfi-icall -fuse-ld=lld -flto -fvisibility=hidden %s -o %t && %run %t 2>&1 | FileCheck %s
33
4- // REQUIRES: lld-available
4+ // REQUIRES: lld-available, cfi
55
66void f () {}
77
Original file line number Diff line number Diff line change @@ -45,6 +45,9 @@ def build_invocation(compile_flags):
4545]: # TODO: Windows
4646 config .unsupported = True
4747
48+ if config .test_cfi :
49+ config .available_features .add ("cfi" )
50+
4851# Don't target x86_64h if the test machine can't execute x86_64h binaries.
4952if "-arch x86_64h" in target_cflags and "x86_64h" not in config .available_features :
5053 config .unsupported = True
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ config.name_suffix = "@UBSAN_TEST_CONFIG_SUFFIX@"
55# Tool-specific config options.
66config.target_cflags = "@UBSAN_TEST_TARGET_CFLAGS@"
77config.target_arch = "@UBSAN_TEST_TARGET_ARCH@"
8+ config.test_cfi = "@UBSAN_TEST_HAS_CFI_PYBOOL@"
89
910# Load common config for all compiler-rt lit tests.
1011lit_config.load_config(config, "@COMPILER_RT_BINARY_DIR@/test/lit.common.configured")
You can’t perform that action at this time.
0 commit comments