Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make test_executor composition common for lit tests #268

Merged
merged 1 commit into from
Jul 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 10 additions & 18 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ function(
variant
target_triple
flags
test_executor_params
test_executor
libc_target
)
# We can't always put the exact target
Expand Down Expand Up @@ -584,13 +584,6 @@ Hard-float library with target triple \"${target_triple}\" must end \"-eabihf\""
set(compiler_rt_test_flags "${compiler_rt_test_flags} -fomit-frame-pointer")
endif()

set(
test_executor
${CMAKE_CURRENT_SOURCE_DIR}/test-support/lit-exec-qemu.py
${test_executor_params}
)
list(JOIN test_executor " " test_executor)

ExternalProject_Add(
compiler_rt_${variant}
SOURCE_DIR ${llvmproject_SOURCE_DIR}/compiler-rt
Expand Down Expand Up @@ -660,19 +653,12 @@ function(
variant
target_triple
flags
test_executor_params
test_executor
libc_target
extra_cmake_options
)
get_runtimes_flags("${directory}" "${flags}")

set(
test_executor
${CMAKE_CURRENT_SOURCE_DIR}/test-support/lit-exec-qemu.py
${test_executor_params}
)
list(JOIN test_executor " " test_executor)

ExternalProject_Add(
libcxx_libcxxabi_libunwind_${variant}
SOURCE_DIR ${llvmproject_SOURCE_DIR}/runtimes
Expand Down Expand Up @@ -876,6 +862,12 @@ function(add_library_variant target_arch)
"${VARIANT_QEMU_CPU}"
"${VARIANT_QEMU_PARAMS}"
)
set(
lit_test_executor
${CMAKE_CURRENT_SOURCE_DIR}/test-support/lit-exec-qemu.py
${test_executor_params}
)
list(JOIN lit_test_executor " " lit_test_executor)
if(NOT PREBUILT_TARGET_LIBRARIES)
add_picolibc(
"${directory}"
Expand All @@ -894,15 +886,15 @@ function(add_library_variant target_arch)
"${variant}"
"${target_triple}"
"${VARIANT_COMPILE_FLAGS}"
"${test_executor_params}"
"${lit_test_executor}"
"picolibc_${variant}-install"
)
add_libcxx_libcxxabi_libunwind(
"${directory}"
"${variant}"
"${target_triple}"
"${VARIANT_COMPILE_FLAGS}"
"${test_executor_params}"
"${lit_test_executor}"
"picolibc_${variant}-install"
"${picolibc_specific_runtimes_options}"
)
Expand Down