libc++
Some checks failed
demo.yaml / libc++ (push) Failing after 0s

This commit is contained in:
Jorijn van der Graaf 2026-03-02 15:24:45 +01:00
commit 9bd12660eb
8 changed files with 94 additions and 60 deletions

View file

@ -1,46 +1,50 @@
mkdir build
mkdir bin
mkdir bin/executable
mkdir bin/executable-linux-gnu
GCC_VERSION=$(g++ -dumpversion)
STD_HEADER="/usr/include/c++/$GCC_VERSION/bits/std.cc"
if [ ! -f "$STD_HEADER" ]; then
echo "Cannot find std.cc for GCC $GCC_VERSION"
exit 1
fi
cp "$STD_HEADER" ./build/std.cppm
clang++ -std=c++26 -Wno-reserved-identifier -Wno-reserved-module-identifier --precompile ./build/std.cppm -o ./build/std.pcm
clang++ -std=c++26 --precompile -fprebuilt-module-path=./build -D CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_pc_linux_gnu -D CRAFTER_BUILD_CONFIGURATION_TYPE_EXECUTABLE interfaces/Crafter.Build-CompileStatus.cppm -o ./build/Crafter.Build-CompileStatus.pcm
clang++ -std=c++26 --precompile -fprebuilt-module-path=./build -D CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_pc_linux_gnu -D CRAFTER_BUILD_CONFIGURATION_TYPE_EXECUTABLE interfaces/Crafter.Build-Command.cppm -o ./build/Crafter.Build-Command.pcm
clang++ -std=c++26 --precompile -fprebuilt-module-path=./build -D CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_pc_linux_gnu -D CRAFTER_BUILD_CONFIGURATION_TYPE_EXECUTABLE interfaces/Crafter.Build-Shader.cppm -o ./build/Crafter.Build-Shader.pcm
clang++ -std=c++26 --precompile -fprebuilt-module-path=./build -D CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_pc_linux_gnu -D CRAFTER_BUILD_CONFIGURATION_TYPE_EXECUTABLE interfaces/Crafter.Build-Module.cppm -o ./build/Crafter.Build-Module.pcm
clang++ -std=c++26 --precompile -fprebuilt-module-path=./build -D CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_pc_linux_gnu -D CRAFTER_BUILD_CONFIGURATION_TYPE_EXECUTABLE interfaces/Crafter.Build-Implementation.cppm -o ./build/Crafter.Build-Implementation.pcm
clang++ -std=c++26 --precompile -fprebuilt-module-path=./build -D CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_pc_linux_gnu -D CRAFTER_BUILD_CONFIGURATION_TYPE_EXECUTABLE interfaces/Crafter.Build-Configuration.cppm -o ./build/Crafter.Build-Configuration.pcm
clang++ -std=c++26 --precompile -fprebuilt-module-path=./build -D CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_pc_linux_gnu -D CRAFTER_BUILD_CONFIGURATION_TYPE_EXECUTABLE interfaces/Crafter.Build-Test.cppm -o ./build/Crafter.Build-Test.pcm
clang++ -std=c++26 --precompile -fprebuilt-module-path=./build -D CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_pc_linux_gnu -D CRAFTER_BUILD_CONFIGURATION_TYPE_EXECUTABLE interfaces/Crafter.Build-Project.cppm -o ./build/Crafter.Build-Project.pcm
clang++ -std=c++26 --precompile -fprebuilt-module-path=./build -D CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_pc_linux_gnu -D CRAFTER_BUILD_CONFIGURATION_TYPE_EXECUTABLE interfaces/Crafter.Build.cppm -o ./build/Crafter.Build.pcm
git clone https://github.com/KhronosGroup/glslang.git ./build/glslang
clang++ -std=c++26 -O3 -march=native -mtune=native -fprebuilt-module-path=./build -D CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_pc_linux_gnu -D CRAFTER_BUILD_CONFIGURATION_TYPE_EXECUTABLE -c ./build/Crafter.Build-Command.pcm -o ./build/Crafter.Build-Command.o
clang++ -std=c++26 -O3 -march=native -mtune=native -fprebuilt-module-path=./build -D CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_pc_linux_gnu -D CRAFTER_BUILD_CONFIGURATION_TYPE_EXECUTABLE -c ./build/Crafter.Build-Shader.pcm -o ./build/Crafter.Build-Shader.o
clang++ -std=c++26 -O3 -march=native -mtune=native -fprebuilt-module-path=./build -D CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_pc_linux_gnu -D CRAFTER_BUILD_CONFIGURATION_TYPE_EXECUTABLE -c ./build/Crafter.Build-Module.pcm -o ./build/Crafter.Build-Module.o
clang++ -std=c++26 -O3 -march=native -mtune=native -fprebuilt-module-path=./build -D CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_pc_linux_gnu -D CRAFTER_BUILD_CONFIGURATION_TYPE_EXECUTABLE -c ./build/Crafter.Build-Implementation.pcm -o ./build/Crafter.Build-Implementation.o
clang++ -std=c++26 -O3 -march=native -mtune=native -fprebuilt-module-path=./build -D CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_pc_linux_gnu -D CRAFTER_BUILD_CONFIGURATION_TYPE_EXECUTABLE -c ./build/Crafter.Build-Configuration.pcm -o ./build/Crafter.Build-Configuration.o
clang++ -std=c++26 -O3 -march=native -mtune=native -fprebuilt-module-path=./build -D CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_pc_linux_gnu -D CRAFTER_BUILD_CONFIGURATION_TYPE_EXECUTABLE -c ./build/Crafter.Build-Project.pcm -o ./build/Crafter.Build-Project.o
clang++ -std=c++26 -O3 -march=native -mtune=native -fprebuilt-module-path=./build -D CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_pc_linux_gnu -D CRAFTER_BUILD_CONFIGURATION_TYPE_EXECUTABLE -c ./build/Crafter.Build-Test.pcm -o ./build/Crafter.Build-Test.o
clang++ -std=c++26 -O3 -march=native -mtune=native -fprebuilt-module-path=./build -D CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_pc_linux_gnu -D CRAFTER_BUILD_CONFIGURATION_TYPE_EXECUTABLE -c ./build/Crafter.Build-CompileStatus.pcm -o ./build/Crafter.Build-CompileStatus.o
clang++ -std=c++26 -O3 -march=native -mtune=native -fprebuilt-module-path=./build -D CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_pc_linux_gnu -D CRAFTER_BUILD_CONFIGURATION_TYPE_EXECUTABLE -c ./build/Crafter.Build.pcm -o ./build/Crafter.Build.o
current_dir=$(pwd)
clang++ -std=c++26 -O3 -march=native -mtune=native -fprebuilt-module-path=./build -D CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_pc_linux_gnu -D CRAFTER_BUILD_CONFIGURATION_TYPE_EXECUTABLE -c ./implementations/Crafter.Build-Command.cpp -o ./build/Crafter.Build-Command_impl.o
clang++ -std=c++26 -O3 -march=native -mtune=native -fprebuilt-module-path=./build -D CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_pc_linux_gnu -D CRAFTER_BUILD_CONFIGURATION_TYPE_EXECUTABLE -c ./implementations/Crafter.Build-Test.cpp -o ./build/Crafter.Build-Test_impl.o
clang++ -std=c++26 -O3 -march=native -mtune=native -fprebuilt-module-path=./build -D CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_pc_linux_gnu -D CRAFTER_BUILD_CONFIGURATION_TYPE_EXECUTABLE -c ./implementations/Crafter.Build-Implementation.cpp -o ./build/Crafter.Build-Implementation_impl.o
clang++ -std=c++26 -O3 -march=native -mtune=native -fprebuilt-module-path=./build -D CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_pc_linux_gnu -D CRAFTER_BUILD_CONFIGURATION_TYPE_EXECUTABLE -c ./implementations/Crafter.Build-Shader.cpp -o ./build/Crafter.Build-Shader_impl.o
clang++ -std=c++26 -O3 -march=native -mtune=native -fprebuilt-module-path=./build -D CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_pc_linux_gnu -D CRAFTER_BUILD_CONFIGURATION_TYPE_EXECUTABLE -c ./implementations/Crafter.Build-Module.cpp -o ./build/Crafter.Build-Module_impl.o
clang++ -std=c++26 -O3 -march=native -mtune=native -fprebuilt-module-path=./build -D CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_pc_linux_gnu -D CRAFTER_BUILD_CONFIGURATION_TYPE_EXECUTABLE -c ./implementations/Crafter.Build-Configuration.cpp -o ./build/Crafter.Build-Configuration_impl.o
clang++ -std=c++26 -O3 -march=native -mtune=native -fprebuilt-module-path=./build -D CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_pc_linux_gnu -D CRAFTER_BUILD_CONFIGURATION_TYPE_EXECUTABLE -c ./implementations/Crafter.Build-Project.cpp -o ./build/Crafter.Build-Project_impl.o
clang++ -std=c++26 -O3 -march=native -mtune=native -fprebuilt-module-path=./build -D CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_pc_linux_gnu -D CRAFTER_BUILD_CONFIGURATION_TYPE_EXECUTABLE -c ./implementations/main.cpp -o ./build/main.o
cd ./build/glslang
cmake -B build \
-DCMAKE_C_COMPILER=clang \
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_CXX_FLAGS="-stdlib=libc++" \
-DCMAKE_EXE_LINKER_FLAGS="-stdlib=libc++" \
-DCMAKE_SHARED_LINKER_FLAGS="-stdlib=libc++" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_ARCHIVE_OUTPUT_DIRECTORY=$current_dir/build \
-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=$current_dir/build \
-DENABLE_OPT=OFF
clang++ -std=c++26 -O3 -march=native -mtune=native -L/usr/local/lib -L/usr/lib/ -lvulkan -lMachineIndependent -lOSDependent -lGenericCodeGen -lglslang -lglslang-default-resource-limits -lSPIRV -ltbb -fuse-ld=lld ./build/Crafter.Build-Command.o ./build/Crafter.Build-CompileStatus.o ./build/Crafter.Build-Shader.o ./build/Crafter.Build-Module.o ./build/Crafter.Build-Configuration.o ./build/Crafter.Build-Project.o ./build/Crafter.Build.o ./build/Crafter.Build-Command_impl.o ./build/Crafter.Build-Shader_impl.o ./build/Crafter.Build-Module_impl.o ./build/Crafter.Build-Configuration_impl.o ./build/Crafter.Build-Project_impl.o ./build/Crafter.Build-Implementation.o ./build/Crafter.Build-Implementation_impl.o ./build/Crafter.Build-Test_impl.o ./build/Crafter.Build-Test.o ./build/main.o -o ./bin/executable/crafter-build
cmake --build build --config Release
cd ../../
common_options="-stdlib=libc++ -I./build -std=c++26 -O3 -march=native -mtune=native -fprebuilt-module-path=./build -D CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_pc_linux_gnu -D CRAFTER_BUILD_CONFIGURATION_TYPE_EXECUTABLE -D CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_pc_linux_gnu -D CRAFTER_BUILD_CONFIGURATION_TYPE_EXECUTABLE -c"
clang++ -std=c++26 -stdlib=libc++ -Wno-reserved-identifier -Wno-reserved-module-identifier --precompile /usr/share/libc++/v1/std.cppm -o ./build/std.pcm
clang++ $common_options -fmodule-output interfaces/Crafter.Build-CompileStatus.cppm -o ./build/Crafter.Build-CompileStatus.o
clang++ $common_options -fmodule-output interfaces/Crafter.Build-Command.cppm -o ./build/Crafter.Build-Command.o
clang++ $common_options -fmodule-output interfaces/Crafter.Build-Shader.cppm -o ./build/Crafter.Build-Shader.o
clang++ $common_options -fmodule-output interfaces/Crafter.Build-Module.cppm -o ./build/Crafter.Build-Module.o
clang++ $common_options -fmodule-output interfaces/Crafter.Build-Implementation.cppm -o ./build/Crafter.Build-Implementation.o
clang++ $common_options -fmodule-output interfaces/Crafter.Build-Configuration.cppm -o ./build/Crafter.Build-Configuration.o
clang++ $common_options -fmodule-output interfaces/Crafter.Build-Test.cppm -o ./build/Crafter.Build-Test.o
clang++ $common_options -fmodule-output interfaces/Crafter.Build-Project.cppm -o ./build/Crafter.Build-Project.o
clang++ $common_options -fmodule-output interfaces/Crafter.Build.cppm -o ./build/Crafter.Build.o
clang++ $common_options ./implementations/Crafter.Build-Command.cpp -o ./build/Crafter.Build-Command_impl.o
clang++ $common_options ./implementations/Crafter.Build-Test.cpp -o ./build/Crafter.Build-Test_impl.o
clang++ $common_options ./implementations/Crafter.Build-Implementation.cpp -o ./build/Crafter.Build-Implementation_impl.o
clang++ $common_options ./implementations/Crafter.Build-Shader.cpp -o ./build/Crafter.Build-Shader_impl.o
clang++ $common_options ./implementations/Crafter.Build-Module.cpp -o ./build/Crafter.Build-Module_impl.o
clang++ $common_options ./implementations/Crafter.Build-Configuration.cpp -o ./build/Crafter.Build-Configuration_impl.o
clang++ $common_options ./implementations/Crafter.Build-Project.cpp -o ./build/Crafter.Build-Project_impl.o
clang++ $common_options ./implementations/main.cpp -o ./build/main.o
clang++ -std=c++26 -stdlib=libc++ -O3 -march=native -mtune=native -L./build -fuse-ld=lld -lSPIRV -GenericCodeGen -lglslang -lOSDependent -lMachineIndependent -lglslang-default-resource-limits ./build/Crafter.Build-Command.o ./build/Crafter.Build-CompileStatus.o ./build/Crafter.Build-Shader.o ./build/Crafter.Build-Module.o ./build/Crafter.Build-Configuration.o ./build/Crafter.Build-Project.o ./build/Crafter.Build.o ./build/Crafter.Build-Command_impl.o ./build/Crafter.Build-Shader_impl.o ./build/Crafter.Build-Module_impl.o ./build/Crafter.Build-Configuration_impl.o ./build/Crafter.Build-Project_impl.o ./build/Crafter.Build-Implementation.o ./build/Crafter.Build-Implementation_impl.o ./build/Crafter.Build-Test_impl.o ./build/Crafter.Build-Test.o ./build/main.o -o ./bin/executable-linux-gnu/crafter-build
cp -r binlib/* bin/
rm -rf build