summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorJoseph Huber <jhuber6@vols.utk.edu>2023-05-03 10:12:34 -0500
committerJoseph Huber <jhuber6@vols.utk.edu>2023-05-03 11:37:51 -0500
commitfe710ffe97333d4a9e5af182cc213bbddc45ed66 (patch)
tree74a83fbec44efbd4d0f03921e6b6c777b8eaa470 /libc
parent78d7d62c36f54b4264faec8ce38d11f7dd6abfd6 (diff)
downloadllvm-fe710ffe97333d4a9e5af182cc213bbddc45ed66.tar.gz
[libc] Don't use '-nolibc' on the GPU build
We previously changed this to use `nolibc` to allow it to link in compiler builtins for the CPU build. However, these options are unused on the GPU and create a lot of noise. Furthermore, we want to use `nogpulib` to prevent the linking in of the vendor libraries. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D149753
Diffstat (limited to 'libc')
-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 0f82c49f26b7..b9c05a1d0c8d 100644
--- a/libc/cmake/modules/LLVMLibCTestRules.cmake
+++ b/libc/cmake/modules/LLVMLibCTestRules.cmake
@@ -658,7 +658,11 @@ function(add_libc_hermetic_test test_name)
target_compile_options(${fq_build_target_name}
PRIVATE ${LIBC_HERMETIC_TEST_COMPILE_OPTIONS} ${HERMETIC_TEST_COMPILE_OPTIONS})
- 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}
PRIVATE