diff options
| author | Martin Storsjö <martin@martin.st> | 2024-09-05 17:25:41 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-05 10:25:41 -0400 |
| commit | 5024dff6eee5a95a741b063c953422c5b6d02fdc (patch) | |
| tree | 4a51f78a0ab4b7b3bb3a3a4191556ef82f32df41 /.github/workflows/libcxx-build-and-test.yaml | |
| parent | 9e85efb0dec8e78ca69925a05c0bbba211dee507 (diff) | |
[libc++][ci] Add a test configuration with an incomplete sysroot (#107089)
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.
We simulate that scenario by removing the libc++ headers, libunwind and
libc++ libraries from the installed toolchain.
We need to set CMAKE_CXX_COMPILER_WORKS since CMake fails to probe the
compiler. We need to set CMAKE_CXX_COMPILER_TARGET, since LLVM's
heuristics fail when CMake hasn't been able to probe the environment
properly. (This is normal; one has to set those options when setting up
such a toolchain from scratch.)
This adds CI coverage for these build scenarios, which otherwise seldom
are tested by some build flow (but are essential when setting up a cross
compiler from scratch).
Diffstat (limited to '.github/workflows/libcxx-build-and-test.yaml')
| -rw-r--r-- | .github/workflows/libcxx-build-and-test.yaml | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/.github/workflows/libcxx-build-and-test.yaml b/.github/workflows/libcxx-build-and-test.yaml index 1a26a699db8e..b5e60781e000 100644 --- a/.github/workflows/libcxx-build-and-test.yaml +++ b/.github/workflows/libcxx-build-and-test.yaml @@ -242,6 +242,7 @@ jobs: - { config: mingw-dll, mingw: true } - { config: mingw-static, mingw: true } - { config: mingw-dll-i686, mingw: true } + - { config: mingw-incomplete-sysroot, mingw: true } steps: - uses: actions/checkout@v4 - name: Install dependencies @@ -260,6 +261,12 @@ jobs: del llvm-mingw*.zip mv llvm-mingw* c:\llvm-mingw echo "c:\llvm-mingw\bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append + - name: Simulate a from-scratch build of llvm-mingw + if: ${{ matrix.config == 'mingw-incomplete-sysroot' }} + run: | + rm -r c:\llvm-mingw\include\c++ + rm -r c:\llvm-mingw\*-w64-mingw32\lib\libc++* + rm -r c:\llvm-mingw\*-w64-mingw32\lib\libunwind* - name: Add Git Bash to the path run: | echo "c:\Program Files\Git\usr\bin" | Out-File -FilePath $Env:GITHUB_PATH -Encoding utf8 -Append |
