[libcxx-commits] [libcxx] [llvm] [libcxx] [ci] Add a test configuration with an incomplete sysroot (PR #107089)
Martin Storsjö via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Sep 3 11:38:20 PDT 2024
================
@@ -715,6 +715,29 @@ mingw-dll-i686)
-C "${MONOREPO_ROOT}/libcxx/cmake/caches/MinGW.cmake"
check-runtimes
;;
+mingw-incomplete-sysroot)
+ # When bringing up a new cross compiler from scratch, we build
+ # libunwind/libcxx in a setup where the toolchain is incomplete and
+ # unable to perform the normal linker checks; this requires a few
+ # special cases in the CMake files.
+ #
+ # Building in an incomplete setup requires setting CMAKE_*_COMPILER_WORKS,
+ # as CMake fails to probe the compiler. This case also requires
+ # setting CMAKE_CXX_COMPILER_TARGET, as LLVM's heuristics for setting
+ # the triple fails when CMake hasn't been able to probe the environment.
+ # (This is what one has to do when building the initial libunwind/libcxx
+ # for a new toolchain.)
+ clean
+ generate-cmake \
+ -DCMAKE_C_COMPILER_WORKS=TRUE \
+ -DCMAKE_CXX_COMPILER_WORKS=TRUE \
+ -DCMAKE_C_COMPILER_TARGET=x86_64-w64-windows-gnu \
+ -DCMAKE_CXX_COMPILER_TARGET=x86_64-w64-windows-gnu \
----------------
mstorsjo wrote:
I don’t consider this a bug that reasonably can be fixed.
At this stage, we can’t even link a trivial C application (the toolchain implicitly tries to link libunwind, which is yet to be built), so the cmake tests that normally deduce the target triple simply fall flat.
https://github.com/llvm/llvm-project/pull/107089
More information about the libcxx-commits
mailing list