2026-04-27 07:04:42 +02:00
|
|
|
mkdir -p build
|
|
|
|
|
mkdir -p bin
|
test runner, cross-target runners, lib/exe split
- subprocess-isolated test runner (replaces V1 dlopen-RunTest);
Pass/Fail/Crash/Timeout/Skipped outcomes via :Test partition
- TestRunner abstraction with command templates: Local, Ssh,
SshWin (cmd.exe-shell), QemuUser, FromEnv; probe-based skip
when runner unreachable
- transitive PCM-path propagation in Build(); resolveImport
walks deps recursively; depResults cache keyed by PcmDir()
so per-target builds don't collide
- cfg.sysroot threaded through BuildStdPcm + base compile/link
command (enables aarch64 cross via Arch Linux ARM rootfs)
- lib + exe split: project.cpp defines crafterBuildLib
(LibraryStatic) + crafterBuildExe (Executable depending on
it); build.sh produces lib/libcrafter-build.a alongside
bin/crafter-build for downstream static-link consumers
- Windows DLL+launcher: CRAFTER_API macro, /EXPORT flag for
project.dll's CrafterBuildProject; Crafter::Run as the real
entry point with main.cpp as a thin wrapper
- 18 tests: HelloWorld/WithModule/Defines/CrossProjectModule/
Diamond × (Linux + sshwin:winvm), plus Incremental,
BuildError, Libraries, RunnerClassification, QemuUser,
SshRunner, WindowsViaSsh, CrossArchAarch64
- single ./bin/crafter-build test runs everything; Windows
variants skip gracefully if winvm SSH alias unreachable
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-27 22:32:19 +02:00
|
|
|
mkdir -p lib
|
2026-04-27 07:04:42 +02:00
|
|
|
mkdir -p share/crafter-build
|
|
|
|
|
|
|
|
|
|
cp interfaces/Crafter.Build.cppm share/crafter-build/
|
|
|
|
|
cp interfaces/Crafter.Build-Shader.cppm share/crafter-build/
|
|
|
|
|
cp interfaces/Crafter.Build-Platform.cppm share/crafter-build/
|
|
|
|
|
cp interfaces/Crafter.Build-Interface.cppm share/crafter-build/
|
|
|
|
|
cp interfaces/Crafter.Build-Implementation.cppm share/crafter-build/
|
|
|
|
|
cp interfaces/Crafter.Build-External.cppm share/crafter-build/
|
|
|
|
|
cp interfaces/Crafter.Build-Clang.cppm share/crafter-build/
|
test runner, cross-target runners, lib/exe split
- subprocess-isolated test runner (replaces V1 dlopen-RunTest);
Pass/Fail/Crash/Timeout/Skipped outcomes via :Test partition
- TestRunner abstraction with command templates: Local, Ssh,
SshWin (cmd.exe-shell), QemuUser, FromEnv; probe-based skip
when runner unreachable
- transitive PCM-path propagation in Build(); resolveImport
walks deps recursively; depResults cache keyed by PcmDir()
so per-target builds don't collide
- cfg.sysroot threaded through BuildStdPcm + base compile/link
command (enables aarch64 cross via Arch Linux ARM rootfs)
- lib + exe split: project.cpp defines crafterBuildLib
(LibraryStatic) + crafterBuildExe (Executable depending on
it); build.sh produces lib/libcrafter-build.a alongside
bin/crafter-build for downstream static-link consumers
- Windows DLL+launcher: CRAFTER_API macro, /EXPORT flag for
project.dll's CrafterBuildProject; Crafter::Run as the real
entry point with main.cpp as a thin wrapper
- 18 tests: HelloWorld/WithModule/Defines/CrossProjectModule/
Diamond × (Linux + sshwin:winvm), plus Incremental,
BuildError, Libraries, RunnerClassification, QemuUser,
SshRunner, WindowsViaSsh, CrossArchAarch64
- single ./bin/crafter-build test runs everything; Windows
variants skip gracefully if winvm SSH alias unreachable
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-27 22:32:19 +02:00
|
|
|
cp interfaces/Crafter.Build-Test.cppm share/crafter-build/
|
|
|
|
|
cp interfaces/Crafter.Build-Api.h share/crafter-build/
|
2025-11-01 06:50:41 +01:00
|
|
|
|
2026-03-02 15:24:45 +01:00
|
|
|
git clone https://github.com/KhronosGroup/glslang.git ./build/glslang
|
2024-12-28 21:00:12 +01:00
|
|
|
|
2026-03-02 15:24:45 +01:00
|
|
|
current_dir=$(pwd)
|
2024-12-28 21:00:12 +01:00
|
|
|
|
2026-03-02 15:24:45 +01:00
|
|
|
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
|
2025-10-31 16:50:47 +01:00
|
|
|
|
2026-03-02 15:24:45 +01:00
|
|
|
cmake --build build --config Release
|
|
|
|
|
cd ../../
|
|
|
|
|
|
2026-04-27 07:04:42 +02:00
|
|
|
MARCH="${CRAFTER_BUILD_MARCH:-native}"
|
|
|
|
|
MTUNE="${CRAFTER_BUILD_MTUNE:-native}"
|
2026-03-02 15:24:45 +01:00
|
|
|
|
2026-04-27 07:04:42 +02:00
|
|
|
common_options="--target=x86_64-pc-linux-gnu -stdlib=libc++ -I./build/glslang -std=c++26 -O3 -march=$MARCH -mtune=$MTUNE -fprebuilt-module-path=./build -D CRAFTER_BUILD_CONFIGURATION_TARGET_x86_64_pc_linux_gnu -D CRAFTER_BUILD_CONFIGURATION_TYPE_EXECUTABLE -c"
|
|
|
|
|
|
|
|
|
|
clang++ --target=x86_64-pc-linux-gnu -std=c++26 -stdlib=libc++ -O3 -march=$MARCH -mtune=$MTUNE -Wno-reserved-identifier -Wno-reserved-module-identifier --precompile /usr/share/libc++/v1/std.cppm -o ./build/std.pcm
|
2026-03-02 15:24:45 +01:00
|
|
|
|
|
|
|
|
clang++ $common_options -fmodule-output interfaces/Crafter.Build-Shader.cppm -o ./build/Crafter.Build-Shader.o
|
2026-04-27 07:04:42 +02:00
|
|
|
clang++ $common_options -fmodule-output interfaces/Crafter.Build-Platform.cppm -o ./build/Crafter.Build-Platform.o
|
|
|
|
|
clang++ $common_options -fmodule-output interfaces/Crafter.Build-Interface.cppm -o ./build/Crafter.Build-Interface.o
|
2026-03-02 15:24:45 +01:00
|
|
|
clang++ $common_options -fmodule-output interfaces/Crafter.Build-Implementation.cppm -o ./build/Crafter.Build-Implementation.o
|
2026-04-27 07:04:42 +02:00
|
|
|
clang++ $common_options -fmodule-output interfaces/Crafter.Build-External.cppm -o ./build/Crafter.Build-External.o
|
|
|
|
|
clang++ $common_options -fmodule-output interfaces/Crafter.Build-Clang.cppm -o ./build/Crafter.Build-Clang.o
|
test runner, cross-target runners, lib/exe split
- subprocess-isolated test runner (replaces V1 dlopen-RunTest);
Pass/Fail/Crash/Timeout/Skipped outcomes via :Test partition
- TestRunner abstraction with command templates: Local, Ssh,
SshWin (cmd.exe-shell), QemuUser, FromEnv; probe-based skip
when runner unreachable
- transitive PCM-path propagation in Build(); resolveImport
walks deps recursively; depResults cache keyed by PcmDir()
so per-target builds don't collide
- cfg.sysroot threaded through BuildStdPcm + base compile/link
command (enables aarch64 cross via Arch Linux ARM rootfs)
- lib + exe split: project.cpp defines crafterBuildLib
(LibraryStatic) + crafterBuildExe (Executable depending on
it); build.sh produces lib/libcrafter-build.a alongside
bin/crafter-build for downstream static-link consumers
- Windows DLL+launcher: CRAFTER_API macro, /EXPORT flag for
project.dll's CrafterBuildProject; Crafter::Run as the real
entry point with main.cpp as a thin wrapper
- 18 tests: HelloWorld/WithModule/Defines/CrossProjectModule/
Diamond × (Linux + sshwin:winvm), plus Incremental,
BuildError, Libraries, RunnerClassification, QemuUser,
SshRunner, WindowsViaSsh, CrossArchAarch64
- single ./bin/crafter-build test runs everything; Windows
variants skip gracefully if winvm SSH alias unreachable
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-27 22:32:19 +02:00
|
|
|
clang++ $common_options -fmodule-output interfaces/Crafter.Build-Test.cppm -o ./build/Crafter.Build-Test.o
|
2026-04-27 07:04:42 +02:00
|
|
|
clang++ $common_options -fmodule-output interfaces/Crafter.Build.cppm -o ./build/Crafter.Build.o
|
2026-03-02 15:24:45 +01:00
|
|
|
|
|
|
|
|
clang++ $common_options ./implementations/Crafter.Build-Shader.cpp -o ./build/Crafter.Build-Shader_impl.o
|
2026-04-27 07:04:42 +02:00
|
|
|
clang++ $common_options ./implementations/Crafter.Build-Platform.cpp -o ./build/Crafter.Build-Platform_impl.o
|
|
|
|
|
clang++ $common_options ./implementations/Crafter.Build-Interface.cpp -o ./build/Crafter.Build-Interface_impl.o
|
|
|
|
|
clang++ $common_options ./implementations/Crafter.Build-Implementation.cpp -o ./build/Crafter.Build-Implementation_impl.o
|
|
|
|
|
clang++ $common_options ./implementations/Crafter.Build-External.cpp -o ./build/Crafter.Build-External_impl.o
|
|
|
|
|
clang++ $common_options ./implementations/Crafter.Build-Clang.cpp -o ./build/Crafter.Build-Clang_impl.o
|
test runner, cross-target runners, lib/exe split
- subprocess-isolated test runner (replaces V1 dlopen-RunTest);
Pass/Fail/Crash/Timeout/Skipped outcomes via :Test partition
- TestRunner abstraction with command templates: Local, Ssh,
SshWin (cmd.exe-shell), QemuUser, FromEnv; probe-based skip
when runner unreachable
- transitive PCM-path propagation in Build(); resolveImport
walks deps recursively; depResults cache keyed by PcmDir()
so per-target builds don't collide
- cfg.sysroot threaded through BuildStdPcm + base compile/link
command (enables aarch64 cross via Arch Linux ARM rootfs)
- lib + exe split: project.cpp defines crafterBuildLib
(LibraryStatic) + crafterBuildExe (Executable depending on
it); build.sh produces lib/libcrafter-build.a alongside
bin/crafter-build for downstream static-link consumers
- Windows DLL+launcher: CRAFTER_API macro, /EXPORT flag for
project.dll's CrafterBuildProject; Crafter::Run as the real
entry point with main.cpp as a thin wrapper
- 18 tests: HelloWorld/WithModule/Defines/CrossProjectModule/
Diamond × (Linux + sshwin:winvm), plus Incremental,
BuildError, Libraries, RunnerClassification, QemuUser,
SshRunner, WindowsViaSsh, CrossArchAarch64
- single ./bin/crafter-build test runs everything; Windows
variants skip gracefully if winvm SSH alias unreachable
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-27 22:32:19 +02:00
|
|
|
clang++ $common_options ./implementations/Crafter.Build-Test.cpp -o ./build/Crafter.Build-Test_impl.o
|
2026-03-02 15:24:45 +01:00
|
|
|
clang++ $common_options ./implementations/main.cpp -o ./build/main.o
|
|
|
|
|
|
test runner, cross-target runners, lib/exe split
- subprocess-isolated test runner (replaces V1 dlopen-RunTest);
Pass/Fail/Crash/Timeout/Skipped outcomes via :Test partition
- TestRunner abstraction with command templates: Local, Ssh,
SshWin (cmd.exe-shell), QemuUser, FromEnv; probe-based skip
when runner unreachable
- transitive PCM-path propagation in Build(); resolveImport
walks deps recursively; depResults cache keyed by PcmDir()
so per-target builds don't collide
- cfg.sysroot threaded through BuildStdPcm + base compile/link
command (enables aarch64 cross via Arch Linux ARM rootfs)
- lib + exe split: project.cpp defines crafterBuildLib
(LibraryStatic) + crafterBuildExe (Executable depending on
it); build.sh produces lib/libcrafter-build.a alongside
bin/crafter-build for downstream static-link consumers
- Windows DLL+launcher: CRAFTER_API macro, /EXPORT flag for
project.dll's CrafterBuildProject; Crafter::Run as the real
entry point with main.cpp as a thin wrapper
- 18 tests: HelloWorld/WithModule/Defines/CrossProjectModule/
Diamond × (Linux + sshwin:winvm), plus Incremental,
BuildError, Libraries, RunnerClassification, QemuUser,
SshRunner, WindowsViaSsh, CrossArchAarch64
- single ./bin/crafter-build test runs everything; Windows
variants skip gracefully if winvm SSH alias unreachable
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-27 22:32:19 +02:00
|
|
|
ar rcs ./lib/libcrafter-build.a \
|
|
|
|
|
./build/Crafter.Build-Shader.o \
|
|
|
|
|
./build/Crafter.Build-Platform.o \
|
|
|
|
|
./build/Crafter.Build-Interface.o \
|
|
|
|
|
./build/Crafter.Build-Implementation.o \
|
|
|
|
|
./build/Crafter.Build-External.o \
|
|
|
|
|
./build/Crafter.Build-Clang.o \
|
|
|
|
|
./build/Crafter.Build-Test.o \
|
|
|
|
|
./build/Crafter.Build.o \
|
|
|
|
|
./build/Crafter.Build-Shader_impl.o \
|
|
|
|
|
./build/Crafter.Build-Platform_impl.o \
|
|
|
|
|
./build/Crafter.Build-Interface_impl.o \
|
|
|
|
|
./build/Crafter.Build-Implementation_impl.o \
|
|
|
|
|
./build/Crafter.Build-External_impl.o \
|
|
|
|
|
./build/Crafter.Build-Clang_impl.o \
|
|
|
|
|
./build/Crafter.Build-Test_impl.o
|
|
|
|
|
|
2026-04-27 07:04:42 +02:00
|
|
|
clang++ -std=c++26 -stdlib=libc++ -O3 -march=$MARCH -mtune=$MTUNE -fuse-ld=lld \
|
|
|
|
|
-Wl,--export-dynamic \
|
|
|
|
|
-L./build \
|
|
|
|
|
./build/Crafter.Build-Shader.o \
|
|
|
|
|
./build/Crafter.Build-Platform.o \
|
|
|
|
|
./build/Crafter.Build-Interface.o \
|
|
|
|
|
./build/Crafter.Build-Implementation.o \
|
|
|
|
|
./build/Crafter.Build-External.o \
|
|
|
|
|
./build/Crafter.Build-Clang.o \
|
test runner, cross-target runners, lib/exe split
- subprocess-isolated test runner (replaces V1 dlopen-RunTest);
Pass/Fail/Crash/Timeout/Skipped outcomes via :Test partition
- TestRunner abstraction with command templates: Local, Ssh,
SshWin (cmd.exe-shell), QemuUser, FromEnv; probe-based skip
when runner unreachable
- transitive PCM-path propagation in Build(); resolveImport
walks deps recursively; depResults cache keyed by PcmDir()
so per-target builds don't collide
- cfg.sysroot threaded through BuildStdPcm + base compile/link
command (enables aarch64 cross via Arch Linux ARM rootfs)
- lib + exe split: project.cpp defines crafterBuildLib
(LibraryStatic) + crafterBuildExe (Executable depending on
it); build.sh produces lib/libcrafter-build.a alongside
bin/crafter-build for downstream static-link consumers
- Windows DLL+launcher: CRAFTER_API macro, /EXPORT flag for
project.dll's CrafterBuildProject; Crafter::Run as the real
entry point with main.cpp as a thin wrapper
- 18 tests: HelloWorld/WithModule/Defines/CrossProjectModule/
Diamond × (Linux + sshwin:winvm), plus Incremental,
BuildError, Libraries, RunnerClassification, QemuUser,
SshRunner, WindowsViaSsh, CrossArchAarch64
- single ./bin/crafter-build test runs everything; Windows
variants skip gracefully if winvm SSH alias unreachable
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-27 22:32:19 +02:00
|
|
|
./build/Crafter.Build-Test.o \
|
2026-04-27 07:04:42 +02:00
|
|
|
./build/Crafter.Build.o \
|
|
|
|
|
./build/Crafter.Build-Shader_impl.o \
|
|
|
|
|
./build/Crafter.Build-Platform_impl.o \
|
|
|
|
|
./build/Crafter.Build-Interface_impl.o \
|
|
|
|
|
./build/Crafter.Build-Implementation_impl.o \
|
|
|
|
|
./build/Crafter.Build-External_impl.o \
|
|
|
|
|
./build/Crafter.Build-Clang_impl.o \
|
test runner, cross-target runners, lib/exe split
- subprocess-isolated test runner (replaces V1 dlopen-RunTest);
Pass/Fail/Crash/Timeout/Skipped outcomes via :Test partition
- TestRunner abstraction with command templates: Local, Ssh,
SshWin (cmd.exe-shell), QemuUser, FromEnv; probe-based skip
when runner unreachable
- transitive PCM-path propagation in Build(); resolveImport
walks deps recursively; depResults cache keyed by PcmDir()
so per-target builds don't collide
- cfg.sysroot threaded through BuildStdPcm + base compile/link
command (enables aarch64 cross via Arch Linux ARM rootfs)
- lib + exe split: project.cpp defines crafterBuildLib
(LibraryStatic) + crafterBuildExe (Executable depending on
it); build.sh produces lib/libcrafter-build.a alongside
bin/crafter-build for downstream static-link consumers
- Windows DLL+launcher: CRAFTER_API macro, /EXPORT flag for
project.dll's CrafterBuildProject; Crafter::Run as the real
entry point with main.cpp as a thin wrapper
- 18 tests: HelloWorld/WithModule/Defines/CrossProjectModule/
Diamond × (Linux + sshwin:winvm), plus Incremental,
BuildError, Libraries, RunnerClassification, QemuUser,
SshRunner, WindowsViaSsh, CrossArchAarch64
- single ./bin/crafter-build test runs everything; Windows
variants skip gracefully if winvm SSH alias unreachable
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-27 22:32:19 +02:00
|
|
|
./build/Crafter.Build-Test_impl.o \
|
2026-04-27 07:04:42 +02:00
|
|
|
./build/main.o \
|
|
|
|
|
-lSPIRV -lGenericCodeGen -lglslang -lOSDependent -lMachineIndependent -lglslang-default-resource-limits \
|
|
|
|
|
-ldl \
|
|
|
|
|
-o ./bin/crafter-build
|