Skip to content

Updated bgfx.cmake to latest. - #1795

Merged
bkaradzic-microsoft merged 1 commit into
BabylonJS:masterfrom
bkaradzic-microsoft:bk-update-bgfx
Jul 28, 2026
Merged

Updated bgfx.cmake to latest.#1795
bkaradzic-microsoft merged 1 commit into
BabylonJS:masterfrom
bkaradzic-microsoft:bk-update-bgfx

Conversation

@bkaradzic-microsoft

Copy link
Copy Markdown
Member

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the BabylonNative build’s FetchContent pin for bgfx.cmake to a newer upstream commit, keeping the dependency set current while maintaining the project’s existing “pin by commit SHA” approach for most third-party sources.

Changes:

  • Bumped bgfx.cmake GIT_TAG from 3b67f0c0c5505a22f6e88640519b5b473c938ad9 to 44adc64c885739d8721ab97fb7bd511ff72e26d6.

@bkaradzic-microsoft

Copy link
Copy Markdown
Member Author

CI status on the latest bgfx.cmake bump: everything green except iOS_Xcode26 and iOS_Installation, which both fail with the same single error:

clang: error: argument unused during compilation: '-Xarch_x86_64 -msse4.2'
       [-Werror,-Wunused-command-line-argument]

This is a gap in the arch-aware SSE minspec that landed in BabylonJS/bgfx.cmake#133. That change uses -Xarch_x86_64 for universal Apple builds so the flag only reaches the x86_64 slice, which is correct when CMAKE_OSX_ARCHITECTURES describes the slices actually compiled -- true for macOS universal (those jobs pass), but not for Xcode in general.

Our iOS configure goes through leetal/ios-cmake with PLATFORM=OS64COMBINED, which reports architecture(s): arm64;x86_64. Xcode picks slices per SDK at build time, and the Release-iphoneos build compiles arm64 only (x86_64 is the simulator slice, built separately). So the -Xarch_x86_64 applies to nothing, and -Werror turns the resulting unused-argument warning into a build failure.

Fix is up as BabylonJS/bgfx.cmake#134: pair the flag with -Wno-unused-command-line-argument, scoped to the universal-build branch only, so every x86_64 slice that is really compiled still gets the SSE4.2 minspec. I'll bump the GIT_TAG here once that merges.

@bkaradzic-microsoft

Copy link
Copy Markdown
Member Author

Update: the run finished at 31/33 green -- iOS_Xcode26 and iOS_Installation are the only failures, and both are the single -Xarch_x86_64 error described above. Everything else, including all the macOS, UWP arm64, Linux, Android and Win32 jobs, passed on the new bgfx.cmake tag.

I've verified the fix (BabylonJS/bgfx.cmake#134) end-to-end rather than guessing: I pointed a throwaway branch's GIT_TAG at that commit and re-ran just these two jobs on the same runner image and Xcode.

Job bgfx.cmake 7062f11 bgfx.cmake d8e3ba1 (#134)
iOS_Xcode26 / build ❌ exit 65 ✅ 4m4s
iOS_Installation / test-install ❌ exit 65 ✅ 3m14s

So #134 is the only thing standing between this PR and a fully green run. Once it merges I'll bump the GIT_TAG here and re-run.

@bghgary bghgary left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Reviewed by Copilot on behalf of @bghgary]

LGTM

@bkaradzic-microsoft

Copy link
Copy Markdown
Member Author

Green across the board -- 33/33 on 6c55158 (BabylonJS/bgfx.cmake#134). iOS_Xcode26 and iOS_Installation, the only two failures on the previous tag, both pass now, and nothing else regressed.

@bkaradzic-microsoft
bkaradzic-microsoft merged commit 675b767 into BabylonJS:master Jul 28, 2026
34 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.

4 participants