[libcxx] Add a CI configuration for standalone building in llvm-project/runtimes
Generate the llvm-lit script in runtimes/CmakeFiles.txt unless invoked from llvm/runtimes. Differential Revision: https://reviews.llvm.org/D109593
This commit is contained in:
@@ -479,6 +479,19 @@ steps:
|
||||
limit: 2
|
||||
timeout_in_minutes: 120
|
||||
|
||||
- label: "New standalone runtimes build"
|
||||
command: "libcxx/utils/ci/run-buildbot new-standalone"
|
||||
artifact_paths:
|
||||
- "**/test-results.xml"
|
||||
agents:
|
||||
queue: "libcxx-builders"
|
||||
os: "linux"
|
||||
retry:
|
||||
automatic:
|
||||
- exit_status: -1 # Agent was lost
|
||||
limit: 2
|
||||
timeout_in_minutes: 120
|
||||
|
||||
- label: "Runtimes build"
|
||||
command: "libcxx/utils/ci/run-buildbot runtimes-build"
|
||||
artifact_paths:
|
||||
|
||||
@@ -430,6 +430,22 @@ unified-standalone)
|
||||
|
||||
check-cxx-cxxabi
|
||||
;;
|
||||
new-standalone)
|
||||
|
||||
clean
|
||||
|
||||
echo "--- Generating CMake"
|
||||
${CMAKE} \
|
||||
-S "${MONOREPO_ROOT}/runtimes" \
|
||||
-B "${BUILD_DIR}" \
|
||||
-GNinja -DCMAKE_MAKE_PROGRAM="${NINJA}" \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \
|
||||
-DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind" \
|
||||
-DLIBCXX_TEST_CONFIG="${MONOREPO_ROOT}/libcxx/test/configs/libcxx-trunk-shared.cfg.in"
|
||||
|
||||
check-cxx-cxxabi
|
||||
;;
|
||||
runtimes-build)
|
||||
clean
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ set(LLVM_ENABLE_RUNTIMES "" CACHE STRING
|
||||
if(LLVM_ENABLE_RUNTIMES STREQUAL "all" )
|
||||
set(LLVM_ENABLE_RUNTIMES ${LLVM_ALL_RUNTIMES})
|
||||
endif()
|
||||
set(COMMON_CMAKE_ARGS "-DHAVE_LLVM_LIT=ON")
|
||||
foreach(proj ${LLVM_ENABLE_RUNTIMES})
|
||||
set(proj_dir "${CMAKE_CURRENT_SOURCE_DIR}/../../${proj}")
|
||||
if(IS_DIRECTORY ${proj_dir} AND EXISTS ${proj_dir}/CMakeLists.txt)
|
||||
@@ -87,6 +88,7 @@ function(builtin_default_target compiler_rt_path)
|
||||
-DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=${LLVM_ENABLE_PER_TARGET_RUNTIME_DIR_default}
|
||||
-DCMAKE_C_COMPILER_WORKS=ON
|
||||
-DCMAKE_ASM_COMPILER_WORKS=ON
|
||||
${COMMON_CMAKE_ARGS}
|
||||
${BUILTINS_CMAKE_ARGS}
|
||||
PASSTHROUGH_PREFIXES COMPILER_RT
|
||||
USE_TOOLCHAIN
|
||||
@@ -119,6 +121,7 @@ function(builtin_register_target compiler_rt_path target)
|
||||
-DCMAKE_C_COMPILER_WORKS=ON
|
||||
-DCMAKE_ASM_COMPILER_WORKS=ON
|
||||
-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON
|
||||
${COMMON_CMAKE_ARGS}
|
||||
${${target}_extra_args}
|
||||
USE_TOOLCHAIN
|
||||
TARGET_TRIPLE ${target}
|
||||
@@ -236,6 +239,7 @@ function(runtime_default_target)
|
||||
-DCMAKE_C_COMPILER_WORKS=ON
|
||||
-DCMAKE_CXX_COMPILER_WORKS=ON
|
||||
-DCMAKE_ASM_COMPILER_WORKS=ON
|
||||
${COMMON_CMAKE_ARGS}
|
||||
${RUNTIMES_CMAKE_ARGS}
|
||||
PASSTHROUGH_PREFIXES LLVM_ENABLE_RUNTIMES
|
||||
${ARG_PREFIXES}
|
||||
@@ -338,6 +342,7 @@ function(runtime_register_target name target)
|
||||
-DCMAKE_ASM_COMPILER_WORKS=ON
|
||||
-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON
|
||||
-DLLVM_RUNTIMES_TARGET=${name}
|
||||
${COMMON_CMAKE_ARGS}
|
||||
${${name}_extra_args}
|
||||
EXTRA_TARGETS ${${name}_extra_targets}
|
||||
${${name}_test_targets}
|
||||
|
||||
@@ -116,6 +116,8 @@ if (NOT LLVM_DEFAULT_TARGET_TRIPLE)
|
||||
get_host_triple(LLVM_DEFAULT_TARGET_TRIPLE)
|
||||
endif()
|
||||
|
||||
option(LLVM_INCLUDE_TESTS "Generate build targets for the runtimes unit tests." ON)
|
||||
|
||||
# Use libtool instead of ar if you are both on an Apple host, and targeting Apple.
|
||||
if(CMAKE_HOST_APPLE AND APPLE)
|
||||
include(UseLibtool)
|
||||
@@ -184,6 +186,14 @@ if(LLVM_INCLUDE_TESTS)
|
||||
ARGS ${RUNTIMES_LIT_EXTRA_ARGS}
|
||||
)
|
||||
add_custom_target(runtimes-test-depends DEPENDS ${RUNTIMES_LIT_DEPENDS})
|
||||
|
||||
if (NOT HAVE_LLVM_LIT)
|
||||
# If built by manually invoking cmake on this directory, we don't have
|
||||
# llvm-lit. If invoked via llvm/runtimes, the toplevel llvm cmake
|
||||
# invocation already generated the llvm-lit script.
|
||||
add_subdirectory(${LLVM_MAIN_SRC_DIR}/utils/llvm-lit
|
||||
${CMAKE_CURRENT_BINARY_DIR}/llvm-lit)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
get_property(SUB_COMPONENTS GLOBAL PROPERTY SUB_COMPONENTS)
|
||||
|
||||
Reference in New Issue
Block a user