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

This commit is contained in:
Martin Storsjö committed 2024-08-20 11:31:04 +03:00
1 parent c5d169f1dc
commit e3790acf7d
2 files changed
+9 -2

No files matched your search

+7
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