Skip to content

Commit 22ebf1e

Browse files
committed
[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.
1 parent 070d211 commit 22ebf1e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

libc/cmake/modules/LLVMLibCTestRules.cmake

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,11 @@ function(add_integration_test test_name)
525525
--target=${LIBC_GPU_TARGET_TRIPLE})
526526
endif()
527527

528-
target_link_options(${fq_build_target_name} PRIVATE -nolibc -nostartfiles -nostdlib++ -static)
528+
if(LIBC_TARGET_ARCHITECTURE_IS_GPU)
529+
target_link_options(${fq_build_target_name} PRIVATE -nostdlib -static)
530+
else()
531+
target_link_options(${fq_build_target_name} PRIVATE -nolibc -nostartfiles -nostdlib++ -static)
532+
endif()
529533
target_link_libraries(
530534
${fq_build_target_name}
531535
# The NVIDIA 'nvlink' linker does not currently support static libraries.

0 commit comments

Comments
 (0)