Skip to content

Build-system fixes: multi-TFM dedup, clean fix, loader strip, sk_renderer auto-detect - #6

Merged
austinbhale merged 4 commits into
developfrom
build-dedup-and-fixes
Jul 24, 2026
Merged

Build-system fixes: multi-TFM dedup, clean fix, loader strip, sk_renderer auto-detect#6
austinbhale merged 4 commits into
developfrom
build-dedup-and-fixes

Conversation

@austinbhale

@austinbhale austinbhale commented Jul 24, 2026

Copy link
Copy Markdown
Member

1. fix: dedup native build/clean across multi-TFM builds via inner MSBuild project

Multi-TFM builds (e.g. net10.0 + net10.0-windows) and multi-project solutions each ran their own cmake --build of the same preset concurrently — racing on the same intermediate dir, and doing the same work twice. The cmake configure/build and the clean's directory removal now route through a new BuildStereoKitNative.proj via the <MSBuild> task, so MSBuild collapses identical concurrent requests into a single execution. Also:

  • Clean uses cmake -E rm -rf, which handles the read-only git objects under _deps that RemoveDir fails on (MSB3231).
  • Design-time (IntelliSense) builds skip the native build entirely.

2. fix: strip openxr_loader to a side file instead of in place

The distribute step stripped the loader's actual build output on every StereoKitC post-build — destroying debug symbols in the build tree and rewriting the file each build. Now strips to a .stripped side file in the binary dir and points the distribute copy at it. Distribute output unchanged; build tree keeps symbols.

3. feat: auto-detect sibling sk_renderer checkout, use per-preset binary dir

SK_LOCAL_SK_RENDERER defaults ON when a sibling ../sk_renderer clone exists. The local add_subdirectory binary dir moves into CMAKE_BINARY_DIR so each preset (MSVC, NDK) gets its own build tree instead of colliding in a shared ../sk_renderer/build.

4. fix: drop FORCE from SKSHADERC_ENABLE_GLSLANG so -D overrides work

FORCE stomped the cache on every configure, making it impossible to opt in to glslang from the command line when SK_USE_SVSL is on. Defaults unchanged; an explicit -DSKSHADERC_ENABLE_GLSLANG=ON now wins.

@austinbhale
austinbhale force-pushed the build-dedup-and-fixes branch 2 times, most recently from e8503ec to 1b2c788 Compare July 24, 2026 18:35
…ld project

Delegating the cmake configure/build and the clean's directory removal to
BuildStereoKitNative.proj lets MSBuild collapse concurrent identical requests
from parallel TFM/project builds into a single execution instead of racing.
The clean also switches to 'cmake -E rm -rf', which handles the read-only
git objects under _deps that RemoveDir refuses to delete. Design-time builds
skip the native build entirely.
Stripping the loader's actual build output on every StereoKitC post-build
destroyed debug symbols in the build tree and rewrote the file each build.
Strip to a .stripped side file in the binary dir and point the distribute
copy at it; distribute output is unchanged, the build tree keeps symbols.
… dir

SK_LOCAL_SK_RENDERER now defaults ON when a sibling ../sk_renderer clone
exists. The local add_subdirectory also moves its binary dir into
CMAKE_BINARY_DIR so each preset (MSVC, NDK) gets its own build tree instead
of colliding in a shared ../sk_renderer/build.
FORCE stomped the cache on every configure, making it impossible to opt in
to glslang from the command line when SK_USE_SVSL is on. Without FORCE the
defaults are unchanged, but an explicit -DSKSHADERC_ENABLE_GLSLANG=ON wins.
@austinbhale
austinbhale force-pushed the build-dedup-and-fixes branch from 1b2c788 to 1e48cbc Compare July 24, 2026 18:38
@austinbhale
austinbhale merged commit c268c07 into develop Jul 24, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant