[libcxx-commits] [libcxx] [llvm] [libcxx] [ci] Add a test configuration with an incomplete sysroot (PR #107089)

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Tue Sep 3 11:07:10 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 \
----------------
ldionne wrote:

As part of (or as a prerequisite to) this patch, shouldn't we fix these "bugs" so that we don't have to work around them here?

https://github.com/llvm/llvm-project/pull/107089


More information about the libcxx-commits mailing list