[compiler-rt][tests] Define TARGET_FLAGS
authorHarald van Dijk <harald@gigawatt.nl>
Sat, 30 Jan 2021 13:06:08 +0000 (13:06 +0000)
committerHarald van Dijk <harald@gigawatt.nl>
Sat, 30 Jan 2021 13:06:08 +0000 (13:06 +0000)
D36116 refactored the logic of tests and removed the definition of TARGET_FLAGS, but left one use of it. Restore its definition for that one use, so that an x86_64 test is compiled with -m64.

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D93634

compiler-rt/lib/sanitizer_common/tests/CMakeLists.txt

index abd73ca..0a5cf25 100644 (file)
@@ -160,6 +160,7 @@ macro(add_sanitizer_tests_for_arch arch)
     # Test that the libc-independent part of sanitizer_common is indeed
     # independent of libc, by linking this binary without libc (here) and
     # executing it (unit test in sanitizer_nolibc_test.cpp).
+    get_target_flags_for_arch(${arch} TARGET_FLAGS)
     clang_compile(sanitizer_nolibc_test_main.${arch}.o
                   sanitizer_nolibc_test_main.cpp
                   CFLAGS ${SANITIZER_TEST_CFLAGS_COMMON} ${TARGET_FLAGS}