Skip to content

Commit

Permalink
[libc] Use -nolibc -nostdlib++ -nostartfiles for hermetic test link.
Browse files Browse the repository at this point in the history
We previously used a more stricter -nostdlib option which was also removing
compiler-rt/libgcc.

Reviewed By: jhuber6

Differential Revision: https://reviews.llvm.org/D149683
  • Loading branch information
Siva Chandra Reddy committed May 3, 2023
1 parent af202ea commit db171f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libc/cmake/modules/LLVMLibCTestRules.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ 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 -nostdlib -static)
target_link_options(${fq_build_target_name} PRIVATE -nolibc -nostartfiles -nostdlib++ -static)
target_link_libraries(
${fq_build_target_name}
PRIVATE
Expand Down

0 comments on commit db171f2

Please sign in to comment.