Skip to content

Commit

Permalink
WIP: github: Do a minimal test to try to build the libcxx std c++ module
Browse files Browse the repository at this point in the history
  • Loading branch information
mstorsjo committed Apr 22, 2024
1 parent bde0c9d commit 71a129d
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ jobs:
# llvm-mingw).
LLVM_CMAKEFLAGS="-DLLVM_ENABLE_LIBXML2=OFF -DLLVM_ENABLE_TERMINFO=OFF -DLLDB_ENABLE_PYTHON=OFF" COMPILER_LAUNCHER="ccache" ./build-all.sh $(pwd)/install/llvm-mingw --disable-clang-tools-extra
.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
cd install
DISTRO=ubuntu-$(grep DISTRIB_RELEASE /etc/lsb-release | cut -f 2 -d =)-$(uname -m)
Expand Down Expand Up @@ -403,6 +404,7 @@ jobs:
- uses: actions/checkout@v4
- name: Run tests
run: |
./test-libcxx-module.sh /llvm-mingw
./run-tests.sh /llvm-mingw
./run-lldb-tests.sh /llvm-mingw
Expand Down
28 changes: 28 additions & 0 deletions test-libcxx-module.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/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

: ${ARCH:=x86_64}
$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

0 comments on commit 71a129d

Please sign in to comment.