diff options
author | Siva Chandra Reddy <sivachandra@google.com> | 2022-07-30 01:37:55 +0000 |
---|---|---|
committer | Siva Chandra Reddy <sivachandra@google.com> | 2022-07-30 03:06:08 +0000 |
commit | 12df3080fea1660d8844857f92949e1422eb526d (patch) | |
tree | 51ab644c6da5b904ca8f9731298fe7975256d1ac /libc/cmake/modules/LLVMLibCTestRules.cmake | |
parent | fb7fa27f92caf10315d3fb7def99affb71b4fe44 (diff) | |
download | llvm-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.cmake | 1 |
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 |