summaryrefslogtreecommitdiff
path: root/HOWTO.md
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-01-28 01:27:02 +0100
committerskal <pascal.massimino@gmail.com>2026-01-28 01:27:02 +0100
commit7ed0286e8cd40367ab6ba7f100e3b30d9d1ae383 (patch)
treed7935ffe9ee407c782985789c194b384a36f69f9 /HOWTO.md
parent6cd6fb41ed44bd37bd05e5a4abf23661605c00df (diff)
opt: Implement build stripping and platform-specific size optimizations
Adds a 'STRIP_ALL' mode to minimize binary size for the final build, and refines size optimization flags for macOS. - **STRIP_ALL Mode**: Added a 'DEMO_STRIP_ALL' CMake option that defines 'STRIP_ALL'. In this mode, command-line parsing is bypassed (forcing fullscreen), debug labels/error callbacks are removed from WebGPU, and non-essential code (like iostream) is stripped. - **macOS Optimizations**: Updated CMake to use '-dead_strip' instead of GNU '--gc-sections' on Apple platforms to resolve linker errors and improve dead code elimination. - **Documentation**: Updated HOWTO.md to document the new 'Final / Strip Build' process and FETCH_DEPS.md for optimized wgpu-native build guidance. - **Task 7 & 8**: Marks these tasks as completed in PROJECT_CONTEXT.md.
Diffstat (limited to 'HOWTO.md')
-rw-r--r--HOWTO.md10
1 files changed, 10 insertions, 0 deletions
diff --git a/HOWTO.md b/HOWTO.md
index 73559d0..60a29fa 100644
--- a/HOWTO.md
+++ b/HOWTO.md
@@ -30,6 +30,16 @@ cmake -S . -B build -DDEMO_SIZE_OPT=ON
cmake --build build
```
+### Final / Strip Build
+
+To produce the smallest possible binary (stripping all unnecessary code like command-line parsing and debug info), use the `DEMO_STRIP_ALL` option:
+
+```bash
+cmake -S . -B build -DDEMO_STRIP_ALL=ON
+cmake --build build
+```
+In this mode, the demo will always start in fullscreen.
+
## Testing
**Commit Policy**: Always run tests before committing. Refer to `CONTRIBUTING.md` for details.