aboutsummaryrefslogtreecommitdiff
path: root/libc/cmake
diff options
context:
space:
mode:
authorJoseph Huber <jhuber6@vols.utk.edu>2023-09-29 12:55:03 -0500
committerJoseph Huber <jhuber6@vols.utk.edu>2023-09-29 12:57:02 -0500
commit22ebf1e9b702e59077d668f3fc07632970db5968 (patch)
tree71394ad518bfcb3f6e765d679c27606039016aa9 /libc/cmake
parent070d2114b15e7eefba55516e4689028b6079415f (diff)
downloadllvm-22ebf1e9b702e59077d668f3fc07632970db5968.zip
llvm-22ebf1e9b702e59077d668f3fc07632970db5968.tar.gz
llvm-22ebf1e9b702e59077d668f3fc07632970db5968.tar.bz2
[libc][Obvious] Do not pass 'nolibc' and other flags to the GPU build
Summary: Previously this code was applied to the integration tests but did not copy the logic that stopped this from being passed to the GPU build. Copy the full line to avoid the warnings and prevent any libraries from being included.
Diffstat (limited to 'libc/cmake')
-rw-r--r--libc/cmake/modules/LLVMLibCTestRules.cmake6
1 files changed, 5 insertions, 1 deletions
diff --git a/libc/cmake/modules/LLVMLibCTestRules.cmake b/libc/cmake/modules/LLVMLibCTestRules.cmake
index 3a6e0b8..fc66c12 100644
--- a/libc/cmake/modules/LLVMLibCTestRules.cmake
+++ b/libc/cmake/modules/LLVMLibCTestRules.cmake
@@ -525,7 +525,11 @@ function(add_integration_test test_name)
--target=${LIBC_GPU_TARGET_TRIPLE})
endif()
- target_link_options(${fq_build_target_name} PRIVATE -nolibc -nostartfiles -nostdlib++ -static)
+ if(LIBC_TARGET_ARCHITECTURE_IS_GPU)
+ target_link_options(${fq_build_target_name} PRIVATE -nostdlib -static)
+ else()
+ target_link_options(${fq_build_target_name} PRIVATE -nolibc -nostartfiles -nostdlib++ -static)
+ endif()
target_link_libraries(
${fq_build_target_name}
# The NVIDIA 'nvlink' linker does not currently support static libraries.