test: Do a minimal test to try to build the libcxx std c++ module
This commit is contained in:
1 parent
74e45715e3
commit
334794b40d
2 files changed
+38
No files matched your search
@@ -85,6 +85,7 @@ jobs:
|
|||||||
# llvm-mingw).
|
# llvm-mingw).
|
||||||
LLVM_CMAKEFLAGS="-DLLVM_ENABLE_LIBXML2=OFF -DLLVM_ENABLE_TERMINFO=OFF -DLLDB_ENABLE_PYTHON=OFF" ./build-all.sh $(pwd)/install/llvm-mingw --disable-clang-tools-extra
|
LLVM_CMAKEFLAGS="-DLLVM_ENABLE_LIBXML2=OFF -DLLVM_ENABLE_TERMINFO=OFF -DLLDB_ENABLE_PYTHON=OFF" ./build-all.sh $(pwd)/install/llvm-mingw --disable-clang-tools-extra
|
||||||
.github/workflows/store-version.sh install/llvm-mingw/versions.txt
|
.github/workflows/store-version.sh install/llvm-mingw/versions.txt
|
||||||
|
./test-libcxx-module.sh $(pwd)/install/llvm-mingw
|
||||||
RUN_I686=false RUN_X86_64=false ./run-tests.sh $(pwd)/install/llvm-mingw
|
RUN_I686=false RUN_X86_64=false ./run-tests.sh $(pwd)/install/llvm-mingw
|
||||||
cd install
|
cd install
|
||||||
DISTRO=ubuntu-$(grep DISTRIB_RELEASE /etc/lsb-release | cut -f 2 -d =)-$(uname -m)
|
DISTRO=ubuntu-$(grep DISTRIB_RELEASE /etc/lsb-release | cut -f 2 -d =)-$(uname -m)
|
||||||
@@ -129,6 +130,7 @@ jobs:
|
|||||||
- name: Test using the cross-built assembled toolchain
|
- name: Test using the cross-built assembled toolchain
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update && sudo apt-get install qemu-user-static libc6-arm64-cross libstdc++6-arm64-cross
|
sudo apt-get update && sudo apt-get install qemu-user-static libc6-arm64-cross libstdc++6-arm64-cross
|
||||||
|
QEMU_LD_PREFIX=/usr/aarch64-linux-gnu ./test-libcxx-module.sh $(pwd)/install/llvm-mingw
|
||||||
QEMU_LD_PREFIX=/usr/aarch64-linux-gnu RUN_I686=false RUN_X86_64=false ./run-tests.sh $(pwd)/install/llvm-mingw
|
QEMU_LD_PREFIX=/usr/aarch64-linux-gnu RUN_I686=false RUN_X86_64=false ./run-tests.sh $(pwd)/install/llvm-mingw
|
||||||
- name: Package the toolchain
|
- name: Package the toolchain
|
||||||
env:
|
env:
|
||||||
@@ -206,6 +208,7 @@ jobs:
|
|||||||
# other (arm64) architecture form.
|
# other (arm64) architecture form.
|
||||||
MACOS_REDIST=1 LLVM_CMAKEFLAGS="-DLLVM_ENABLE_ZSTD=OFF -DLLDB_ENABLE_PYTHON=OFF" ./build-all.sh $(pwd)/install/llvm-mingw --disable-clang-tools-extra
|
MACOS_REDIST=1 LLVM_CMAKEFLAGS="-DLLVM_ENABLE_ZSTD=OFF -DLLDB_ENABLE_PYTHON=OFF" ./build-all.sh $(pwd)/install/llvm-mingw --disable-clang-tools-extra
|
||||||
.github/workflows/store-version.sh install/llvm-mingw/versions.txt
|
.github/workflows/store-version.sh install/llvm-mingw/versions.txt
|
||||||
|
./test-libcxx-module.sh $(pwd)/install/llvm-mingw
|
||||||
RUN_I686=false RUN_X86_64=false ./run-tests.sh $(pwd)/install/llvm-mingw
|
RUN_I686=false RUN_X86_64=false ./run-tests.sh $(pwd)/install/llvm-mingw
|
||||||
cd install
|
cd install
|
||||||
NAME=llvm-mingw-$TAG-ucrt-macos-universal
|
NAME=llvm-mingw-$TAG-ucrt-macos-universal
|
||||||
@@ -263,6 +266,7 @@ jobs:
|
|||||||
./build-all.sh $(pwd)/install/llvm-mingw --disable-clang-tools-extra --disable-lldb $ARGS
|
./build-all.sh $(pwd)/install/llvm-mingw --disable-clang-tools-extra --disable-lldb $ARGS
|
||||||
.github/workflows/store-version.sh install/llvm-mingw/versions.txt
|
.github/workflows/store-version.sh install/llvm-mingw/versions.txt
|
||||||
./copy-msys-dependencies.sh $(pwd)/install/llvm-mingw ${{matrix.sys}}
|
./copy-msys-dependencies.sh $(pwd)/install/llvm-mingw ${{matrix.sys}}
|
||||||
|
./test-libcxx-module.sh $(pwd)/install/llvm-mingw
|
||||||
./run-tests.sh $(pwd)/install/llvm-mingw
|
./run-tests.sh $(pwd)/install/llvm-mingw
|
||||||
cd install
|
cd install
|
||||||
NAME=llvm-mingw-$TAG-ucrt-msys2-${{matrix.sys}}
|
NAME=llvm-mingw-$TAG-ucrt-msys2-${{matrix.sys}}
|
||||||
@@ -358,6 +362,7 @@ jobs:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: |
|
run: |
|
||||||
|
./test-libcxx-module.sh /llvm-mingw
|
||||||
./run-tests.sh /llvm-mingw
|
./run-tests.sh /llvm-mingw
|
||||||
./run-lldb-tests.sh /llvm-mingw
|
./run-lldb-tests.sh /llvm-mingw
|
||||||
|
|
||||||
|
|||||||
Executable
+33
@@ -0,0 +1,33 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# Copyright (c) 2024 Martin Storsjo
|
||||||
|
#
|
||||||
|
# Permission to use, copy, modify, and/or distribute this software for any
|
||||||
|
# purpose with or without fee is hereby granted, provided that the above
|
||||||
|
# copyright notice and this permission notice appear in all copies.
|
||||||
|
#
|
||||||
|
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||||
|
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||||
|
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||||
|
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||||
|
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||||
|
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||||
|
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
if [ $# -lt 1 ]; then
|
||||||
|
echo $0 prefix
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
PREFIX="$1"
|
||||||
|
PREFIX="$(cd "$PREFIX" && pwd)"
|
||||||
|
export PATH=$PREFIX/bin:$PATH
|
||||||
|
|
||||||
|
: ${ARCHS:=${TOOLCHAIN_ARCHS-i686 x86_64 armv7 aarch64}}
|
||||||
|
|
||||||
|
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
|
||||||
|
$arch-w64-mingw32-clang++ -I$PREFIX/share/libc++/v1 -std=gnu++23 -Wno-reserved-module-identifier -x c++-module -fmodule-output=std.compat.pcm -fmodule-file=std=std.pcm -o std.compat.cppm.obj -c $PREFIX/share/libc++/v1/std.compat.cppm
|
||||||
|
done
|
||||||
Reference in new issue
Block a user