Improve build system with debug symbols, clean modes, and parallel jobs

- Add build.md documentation for the WASM build system
- Default to debug builds with -gsource-map for WASM debugging
- Add --release flag to disable debug symbols
- Add --clean flag for full rebuild (deps + wxWidgets + KiCad)
- Add -j N flag for parallel compilation (default: 1 for sequential)
- Update Docker memory limit to 32GB
- Propagate DEBUG_BUILD and JOBS to all dependency scripts

Build modes:
- ./docker/build.sh --clean -j8  (full rebuild, parallel)
- ./docker/build.sh              (rebuild KiCad only)
- ./docker/build.sh --no-clean   (incremental)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Viktor Vaczi 2025-12-12 14:51:38 +01:00
commit af2adda002
16 changed files with 398 additions and 44 deletions

View file

@ -54,7 +54,7 @@ cd "${ZSTD_BUILD}"
# Zstd uses CMake in build/cmake directory
emcmake cmake "${ZSTD_DIR}/build/cmake" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_BUILD_TYPE=${BUILD_TYPE:-Debug} \
-DCMAKE_INSTALL_PREFIX="${SYSROOT}" \
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
-DZSTD_BUILD_PROGRAMS=OFF \
@ -62,8 +62,8 @@ emcmake cmake "${ZSTD_DIR}/build/cmake" \
-DZSTD_BUILD_SHARED=OFF \
-DZSTD_BUILD_STATIC=ON \
-DZSTD_MULTITHREAD_SUPPORT=ON \
-DCMAKE_C_FLAGS="-pthread" \
-DCMAKE_CXX_FLAGS="-pthread"
-DCMAKE_C_FLAGS="${DEBUG_CFLAGS:--g -O0} -pthread" \
-DCMAKE_CXX_FLAGS="${DEBUG_CFLAGS:--g -O0} -pthread"
emmake make -j${JOBS}
emmake make install