Skip to content

Commit a099be5

Browse files
committed
apply temp diff (remove later before merge)
1 parent d27b971 commit a099be5

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

libc/cmake/modules/LLVMLibCTestRules.cmake

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,8 @@ function(add_integration_test test_name)
571571
target_compile_options(${fq_build_target_name} PRIVATE
572572
${compile_options} ${INTEGRATION_TEST_COMPILE_OPTIONS})
573573

574+
set(link_libraries "")
575+
574576
if(LIBC_TARGET_ARCHITECTURE_IS_AMDGPU)
575577
target_link_options(${fq_build_target_name} PRIVATE
576578
${LIBC_COMPILE_OPTIONS_DEFAULT} ${INTEGRATION_TEST_COMPILE_OPTIONS}
@@ -599,17 +601,19 @@ function(add_integration_test test_name)
599601
set(link_options
600602
-nolibc
601603
-nostartfiles
602-
-static
604+
-nostdlib
603605
${LIBC_LINK_OPTIONS_DEFAULT}
604606
${LIBC_TEST_LINK_OPTIONS_DEFAULT}
605607
)
606608
target_link_options(${fq_build_target_name} PRIVATE ${link_options})
609+
list(APPEND link_libraries ${LIBGCC_S_LOCATION})
607610
endif()
608611
target_link_libraries(
609612
${fq_build_target_name}
610613
${fq_target_name}.__libc__
611614
libc.startup.${LIBC_TARGET_OS}.crt1
612615
libc.test.IntegrationTest.test
616+
${link_libraries}
613617
)
614618
add_dependencies(${fq_build_target_name}
615619
libc.test.IntegrationTest.test
@@ -807,7 +811,7 @@ function(add_libc_hermetic test_name)
807811
set(link_options
808812
-nolibc
809813
-nostartfiles
810-
-static
814+
-nostdlib
811815
${LIBC_LINK_OPTIONS_DEFAULT}
812816
${LIBC_TEST_LINK_OPTIONS_DEFAULT}
813817
)

0 commit comments

Comments
 (0)