Skip to content

Commit 50d1500

Browse files
[libc] Add ${CMAKE_CROSSCOMPILING_EMULATOR} to custom test cmdlines (#66565)
${CMAKE_CROSSCOMPILING_EMULATOR} will be used in the new rv32 buildbot and is prepended automatically when we call add_custom_target in CMake, except when we use a custom command. There are two places where custom commands are used in libc, so we explicitly add the ${CMAKE_CROSSCOMPILING_EMULATOR} variable there. Other systems that don't use ${CMAKE_CROSSCOMPILING_EMULATOR} are unaffected
1 parent 04f9a8a commit 50d1500

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

libc/cmake/modules/LLVMLibCTestRules.cmake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -551,6 +551,7 @@ function(add_integration_test test_name)
551551
set(test_cmd
552552
${INTEGRATION_TEST_ENV}
553553
$<$<BOOL:${LIBC_TARGET_ARCHITECTURE_IS_GPU}>:${gpu_loader_exe}>
554+
${CMAKE_CROSSCOMPILING_EMULATOR}
554555
${INTEGRATION_TEST_LOADER_ARGS}
555556
$<TARGET_FILE:${fq_build_target_name}> ${INTEGRATION_TEST_ARGS})
556557
add_custom_target(
@@ -711,7 +712,7 @@ function(add_libc_hermetic_test test_name)
711712
endif()
712713

713714
set(test_cmd ${HERMETIC_TEST_ENV}
714-
$<$<BOOL:${LIBC_TARGET_ARCHITECTURE_IS_GPU}>:${gpu_loader_exe}> ${HERMETIC_TEST_LOADER_ARGS}
715+
$<$<BOOL:${LIBC_TARGET_ARCHITECTURE_IS_GPU}>:${gpu_loader_exe}> ${CMAKE_CROSSCOMPILING_EMULATOR} ${HERMETIC_TEST_LOADER_ARGS}
715716
$<TARGET_FILE:${fq_build_target_name}> ${HERMETIC_TEST_ARGS})
716717
add_custom_target(
717718
${fq_target_name}

0 commit comments

Comments
 (0)