test: Set the NATIVE= variable automatically in test-libcxx-module.sh

This commit is contained in:
Martin Storsjö 2024-08-16 11:22:27 +03:00
parent c5d169f1dc
commit e3790acf7d
2 changed files with 9 additions and 2 deletions

View File

@ -266,7 +266,7 @@ jobs:
./build-all.sh $(pwd)/install/llvm-mingw --disable-clang-tools-extra --disable-lldb $ARGS
.github/workflows/store-version.sh install/llvm-mingw/versions.txt
./copy-msys-dependencies.sh $(pwd)/install/llvm-mingw ${{matrix.sys}}
NATIVE=1 ./test-libcxx-module.sh $(pwd)/install/llvm-mingw
./test-libcxx-module.sh $(pwd)/install/llvm-mingw
./run-tests.sh $(pwd)/install/llvm-mingw
cd install
NAME=llvm-mingw-$TAG-ucrt-msys2-${{matrix.sys}}
@ -362,7 +362,7 @@ jobs:
- uses: actions/checkout@v4
- name: Run tests
run: |
NATIVE=1 ./test-libcxx-module.sh /llvm-mingw
./test-libcxx-module.sh /llvm-mingw
./run-tests.sh /llvm-mingw
./run-lldb-tests.sh /llvm-mingw

View File

@ -26,6 +26,13 @@ export PATH=$PREFIX/bin:$PATH
: ${ARCHS:=${TOOLCHAIN_ARCHS-i686 x86_64 armv7 aarch64}}
case $(uname) in
MINGW*|MSYS*)
NATIVE=1
;;
*)
esac
for arch in $ARCHS; do
# TODO: This should ideally use "$CXX -print-file-name=libc++.modules.json", then parse the json to find the relevant cppm file and include directory.
$arch-w64-mingw32-clang++ -I$PREFIX/share/libc++/v1 -std=gnu++23 -Wno-reserved-module-identifier -x c++-module -fmodule-output=std.pcm -o std.cppm.obj -c $PREFIX/share/libc++/v1/std.cppm