forked from OSchip/llvm-project
Revert the removal of LLVM_ENABLE_PROJECTS for libc++ and libc++abi
This commit reverts the following commits: -952f90b72b
-e6a0800532
(D132298) -176db3b3ab
(D132324) These commits caused CI instability and need to be reverted in order to figure things out again. See the discussion in https://llvm.org/D132324 for more information.
This commit is contained in:
parent
7e24354c8b
commit
342e0ebd0b
|
@ -308,6 +308,13 @@ Linux::Linux(const Driver &D, const llvm::Triple &Triple, const ArgList &Args)
|
|||
|
||||
Generic_GCC::AddMultiarchPaths(D, SysRoot, OSLibDir, Paths);
|
||||
|
||||
// The deprecated -DLLVM_ENABLE_PROJECTS=libcxx configuration installs
|
||||
// libc++.so in D.Dir+"/../lib/". Detect this path.
|
||||
// TODO Remove once LLVM_ENABLE_PROJECTS=libcxx is unsupported.
|
||||
if (StringRef(D.Dir).startswith(SysRoot) &&
|
||||
D.getVFS().exists(D.Dir + "/../lib/libc++.so"))
|
||||
addPathIfExists(D, D.Dir + "/../lib", Paths);
|
||||
|
||||
addPathIfExists(D, concat(SysRoot, "/lib"), Paths);
|
||||
addPathIfExists(D, concat(SysRoot, "/usr/lib"), Paths);
|
||||
}
|
||||
|
|
|
@ -100,12 +100,12 @@ if [[ ! -d ${LIBCXX_BUILD} ]]; then
|
|||
mkdir -p ${LIBCXX_BUILD}
|
||||
cd ${LIBCXX_BUILD}
|
||||
LIBCXX_FLAGS="${FLAGS} -Wno-macro-redefined"
|
||||
RUNTIMES=
|
||||
PROJECTS=
|
||||
if [[ ! -d $LLVM_SRC/projects/libcxxabi ]] ; then
|
||||
RUNTIMES="-DLLVM_ENABLE_RUNTIMES='libcxx;libcxxabi'"
|
||||
PROJECTS="-DLLVM_ENABLE_PROJECTS='libcxx;libcxxabi'"
|
||||
fi
|
||||
cmake -GNinja \
|
||||
${RUNTIMES} \
|
||||
${PROJECTS} \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DCMAKE_C_COMPILER=$CC \
|
||||
-DCMAKE_CXX_COMPILER=$CXX \
|
||||
|
|
|
@ -321,6 +321,20 @@ steps:
|
|||
limit: 2
|
||||
timeout_in_minutes: 120
|
||||
|
||||
- label: "Legacy LLVM_ENABLE_PROJECTS build"
|
||||
command: "libcxx/utils/ci/run-buildbot legacy-project-build"
|
||||
artifact_paths:
|
||||
- "**/test-results.xml"
|
||||
- "**/*.abilist"
|
||||
agents:
|
||||
queue: "libcxx-builders"
|
||||
os: "linux"
|
||||
retry:
|
||||
automatic:
|
||||
- exit_status: -1 # Agent was lost
|
||||
limit: 2
|
||||
timeout_in_minutes: 120
|
||||
|
||||
# Tests with various build configurations.
|
||||
- label: "Static libraries"
|
||||
command: "libcxx/utils/ci/run-buildbot generic-static"
|
||||
|
|
|
@ -13,7 +13,7 @@ INSTALL=cxx_install_dir
|
|||
|
||||
mkdir ${BUILD}
|
||||
cmake -S ${PWD} -B ${BUILD} \
|
||||
-DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi" \
|
||||
-DLLVM_ENABLE_PROJECTS="libcxx;libcxxabi" \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DCMAKE_INSTALL_PREFIX="${INSTALL}"
|
||||
cmake --build ${BUILD} --target install-cxx-headers
|
||||
|
|
|
@ -510,6 +510,21 @@ legacy-test-config)
|
|||
-DLIBUNWIND_TEST_CONFIG="${MONOREPO_ROOT}/libunwind/test/lit.site.cfg.in"
|
||||
check-runtimes
|
||||
;;
|
||||
legacy-project-build)
|
||||
clean
|
||||
|
||||
echo "--- Generating CMake"
|
||||
${CMAKE} \
|
||||
-S "${MONOREPO_ROOT}/llvm" \
|
||||
-B "${BUILD_DIR}" \
|
||||
-DLLVM_ENABLE_PROJECTS="libcxx;libunwind;libcxxabi" \
|
||||
-GNinja -DCMAKE_MAKE_PROGRAM="${NINJA}" \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DCMAKE_INSTALL_PREFIX="${INSTALL_DIR}" \
|
||||
-DLLVM_LIT_ARGS="-sv --show-unsupported --xunit-xml-output test-results.xml --timeout=1500" \
|
||||
-DLIBCXX_CXX_ABI=libcxxabi
|
||||
check-runtimes
|
||||
;;
|
||||
aarch64)
|
||||
clean
|
||||
generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/AArch64.cmake"
|
||||
|
|
|
@ -131,17 +131,10 @@ if (NOT LIBCXXABI_ENABLE_SHARED AND NOT LIBCXXABI_ENABLE_STATIC)
|
|||
message(FATAL_ERROR "libc++abi must be built as either a shared or static library.")
|
||||
endif()
|
||||
|
||||
# TODO: Remove this, which shouldn't be necessary since we know we're being built
|
||||
# side-by-side with libc++.
|
||||
set(LIBCXXABI_LIBCXX_INCLUDES "" CACHE PATH
|
||||
"Specify path to libc++ includes.")
|
||||
if (NOT libcxx IN_LIST LLVM_ENABLE_RUNTIMES)
|
||||
if (NOT IS_DIRECTORY ${LIBCXXABI_LIBCXX_INCLUDES})
|
||||
message(FATAL_ERROR
|
||||
"LIBCXXABI_LIBCXX_INCLUDES=${LIBCXXABI_LIBCXX_INCLUDES} is not a valid directory. "
|
||||
"Please provide the path to where the libc++ headers have been installed.")
|
||||
endif()
|
||||
add_library(cxx-headers INTERFACE)
|
||||
target_include_directories(cxx-headers INTERFACE "${LIBCXXABI_LIBCXX_INCLUDES}")
|
||||
endif()
|
||||
|
||||
set(LIBCXXABI_HERMETIC_STATIC_LIBRARY_DEFAULT OFF)
|
||||
if (WIN32)
|
||||
|
|
|
@ -61,13 +61,9 @@ if (LIBCXXABI_BUILD_EXTERNAL_THREAD_LIBRARY)
|
|||
list(APPEND LIBCXXABI_TEST_DEPS cxx_external_threads)
|
||||
endif()
|
||||
|
||||
if(libcxx IN_LIST LLVM_ENABLE_RUNTIMES)
|
||||
list(APPEND LIBCXXABI_TEST_DEPS cxx)
|
||||
endif()
|
||||
if(libunwind IN_LIST LLVM_ENABLE_RUNTIMES)
|
||||
if (LIBCXXABI_USE_LLVM_UNWINDER AND TARGET unwind)
|
||||
list(APPEND LIBCXXABI_TEST_DEPS unwind)
|
||||
endif()
|
||||
list(APPEND LIBCXXABI_TEST_DEPS cxx)
|
||||
if (LIBCXXABI_USE_LLVM_UNWINDER AND TARGET unwind)
|
||||
list(APPEND LIBCXXABI_TEST_DEPS unwind)
|
||||
endif()
|
||||
|
||||
set(AUTO_GEN_COMMENT "## Autogenerated by libcxxabi configuration.\n# Do not edit!")
|
||||
|
|
|
@ -127,11 +127,8 @@ foreach(proj ${LLVM_ENABLE_PROJECTS})
|
|||
endforeach()
|
||||
foreach(proj "libcxx" "libcxxabi" "libunwind")
|
||||
if (${proj} IN_LIST LLVM_ENABLE_PROJECTS)
|
||||
# TODO(Ericson2314): Making non-fatal for now because of out-of-tree docs
|
||||
# CI jobs use this.
|
||||
message(SEND_ERROR
|
||||
"Using LLVM_ENABLE_PROJECTS=${proj} is incorrect. Please use -DLLVM_ENABLE_RUNTIMES=${proj} or "
|
||||
"see the instructions at https://libcxx.llvm.org/BuildingLibcxx.html for building the runtimes.")
|
||||
message(WARNING "Using LLVM_ENABLE_PROJECTS=${proj} is deprecated now, please use -DLLVM_ENABLE_RUNTIMES=${proj} or "
|
||||
"see the instructions at https://libcxx.llvm.org/BuildingLibcxx.html for building the runtimes.")
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
|
|
Loading…
Reference in New Issue