summaryrefslogtreecommitdiff
path: root/libc/cmake/modules/LLVMLibCTestRules.cmake
diff options
context:
space:
mode:
authorSiva Chandra Reddy <sivachandra@google.com>2022-07-30 01:37:55 +0000
committerSiva Chandra Reddy <sivachandra@google.com>2022-07-30 03:06:08 +0000
commit12df3080fea1660d8844857f92949e1422eb526d (patch)
tree51ab644c6da5b904ca8f9731298fe7975256d1ac /libc/cmake/modules/LLVMLibCTestRules.cmake
parentfb7fa27f92caf10315d3fb7def99affb71b4fe44 (diff)
downloadllvm-12df3080fea1660d8844857f92949e1422eb526d.tar.gz
[libc] Compile integration tests with -ffreestanding to avoid mixup with system libc.
Diffstat (limited to 'libc/cmake/modules/LLVMLibCTestRules.cmake')
-rw-r--r--libc/cmake/modules/LLVMLibCTestRules.cmake1
1 files changed, 1 insertions, 0 deletions
diff --git a/libc/cmake/modules/LLVMLibCTestRules.cmake b/libc/cmake/modules/LLVMLibCTestRules.cmake
index 4b60714f3b43..e3032092d7e3 100644
--- a/libc/cmake/modules/LLVMLibCTestRules.cmake
+++ b/libc/cmake/modules/LLVMLibCTestRules.cmake
@@ -486,6 +486,7 @@ function(add_integration_test test_name)
${LIBC_BUILD_DIR}
${LIBC_BUILD_DIR}/include
)
+ target_compile_options(${fq_target_name} PRIVATE -ffreestanding)
# We set a number of link options to prevent picking up system libc binaries.
# Also, we restrict the integration tests to fully static executables. The
# rtlib is set to compiler-rt to make the compiler drivers pick up the compiler