Tooling/clang-cl cross build - #80
Open
Belonit wants to merge 8 commits into
Open
Conversation
Belonit
force-pushed
the
tooling/clang-cl-cross-build
branch
2 times, most recently
from
August 30, 2026 22:48
f91b0ba to
b3554b6
Compare
Keep labels inside their inline assembly blocks and make byte-sized memory operands explicit where clang-cl requires their size.
Configure a Linux-hosted Ninja build with clang-cl, LLD, and the installed MSVC headers and libraries. Apply the compatibility settings required by bx.
Use aligned CRT allocation for bgfx render records so clang-cl-generated aligned SSE accesses cannot receive under-aligned storage.
Assemble the legacy MASM sources with native UASM instead of invoking ml.exe through Wine.
The build pipeline no longer invokes Wine after native UASM and LLVM RC replaced the remaining wrapper tools.
Belonit
force-pushed
the
tooling/clang-cl-cross-build
branch
from
August 30, 2026 23:12
47a9078 to
d910706
Compare
|
Development builds of d910706: The links work without a GitHub account. Artifacts expire after 90 days, and this comment follows the latest successful build. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add an experimental Linux-hosted Win32 cross-build using clang-cl with the MSVC
ABI, headers, and libraries. The branch also makes the C++ sources and legacy
assembly accepted by clang-cl, aligns bgfx render-record allocations, and adds a
VS Code IntelliSense example.
Behavior and compatibility
BX_CONFIG_DEBUGto match the bgfx libraries and allocates bgfx records alignment-correctly, keeping MSVC and clang-cl builds consistent.The codebase may still contain undefined behavior the supported MSVC build does not expose, so a successful clang-cl build is not runtime evidence.
Validate any clang-cl result separately.
Known clang-cl runtime observations:
Validation
built (Release, Ninja) with inherited warnings and no errors; LogStress passed, including 100,000 intact log lines.
Documentation
docs/BUILDING.mddocuments the experimental toolchain requirements,configuration, and the runtime limitation.
Checklist