fix(compat.glfw, compat.mimalloc, compat.vulkan): Windows links as runtime.libraries, not GNU ldflags - #402
Merged
Merged
Conversation
…untime.libraries`, not GNU ldflags
All three declared their Windows system libraries as `ldflags` in the GNU
spelling. `ldflags` reach the linker verbatim, and link.exe does not reject
`-lgdi32` -- it drops it:
LNK4044: unrecognized option '/lgdi32'; ignored
and carries on, so the first sign is a consumer's link ending in unresolved
externals (235 of them on xrgui). Every MSVC consumer has been re-declaring
these three packages' libraries in its own manifest to compensate.
`runtime.libraries` and `runtime.link_library_dirs` are the dialect-neutral
half of a link line: rendered as gdi32.lib / /LIBPATH: for MSVC and -lgdi32 /
-L for GNU. compat.libgbm already uses `link_library_dirs` in this form.
compat.glfw gdi32
compat.mimalloc psapi shell32 user32 advapi32 bcrypt
compat.vulkan vulkan-1, search dir lib/
Linux and macOS sections are unchanged. Payloads are unchanged, so no version
moves. Consumer: Sunrisepeak/xrgui#8, which deletes its copies.
Sunrisepeak
added a commit
to Sunrisepeak/xrgui
that referenced
this pull request
Sep 12, 2026
…do by hand
Five blocks leave build.mcpp and three copies leave mcpp.toml; what stays is
what mcpp has no mechanism for.
runtime data the 71-line copy action (one command per OS, every output
named) is `[runtime] deploy` -- four files and
vk_layer_settings.txt -- and `mcpp pack` stages them too
shaders slang_builder.py, -j 30, --oneshot (every build recompiled
all 17) and a warning on failure become one call into
mcpp.rules.slang: one ninja edge per shader, -depfile for
what a shader imports, a failure that fails the build. The
flags are config.toml's, through extra_args. bloom.merge.slang
is excluded by name: slang 2026.14.1 refuses it, nothing
loads it, and the old flow only ever warned
Windows links gdi32 / psapi / bcrypt were copies of three index packages'
metadata, and vulkan-1's search directory was computed from
whatever the machine had. The packages spell them as
`runtime.libraries` now (mcpplibs/mcpp-index#402); the copies
and the 36-line search go
fontconfig the `linux-desktop` feature the Linux command line had to
name is `[target.linux.dependencies]`, evaluated against the
resolved target
tools node is declared beside python; `xim:slang` is declared by
the rule. No PATH probing is left, and a generator that is
skipped says so through mcpp::warning, the one channel a
green build prints
The manifest also gains what packaging needs: `[package]` metadata (the
dist members read it for the MSI version and the desktop entry), a Windows
icon cut from logo.png, `windows_subsystem = "windows"` on the two GUI
programs, the `llvm@22.1.8` the Linux port was done with, and the appimage /
wix members so `mcpp pack --format` has something to dispatch to.
CI: Windows installs mcpp and nothing else (the manifest provisions the
rest), asserts icons only (shaders are edges now), and packs a zip and an
MSI. A Linux leg builds with the pinned clang, runs the tests, and packs a
tarball and an AppImage. Both name the pack target, because two bin targets
are declared and only one is in the default feature set.
build.mcpp: 480 -> 379 lines, and the three mechanisms that go are the ones
that varied by machine: a shell copy per OS, PATH probing, a link search path
that depended on what was installed.
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.
All three declared their Windows system libraries as
ldflagsin the GNU spelling.ldflagsreach the linker verbatim, and link.exe does not reject-lgdi32, it drops it withLNK4044: unrecognized option '/lgdi32'; ignoredand carries on, so the first sign is a consumer's link ending in unresolved externals. Every MSVC consumer has been re-declaring these packages' libraries to compensate.runtime.libraries/runtime.link_library_dirsare the dialect-neutral spelling (gdi32.lib +/LIBPATH:for MSVC,-lgdi32+-Lfor GNU);compat.libgbmalready useslink_library_dirsin this form.link_library_dirs = ["lib"]Linux and macOS sections unchanged; payloads unchanged, no version moves. Local: syntax, mirror, package-name and parity lints and
mcpp xpkg parsepass on all three.Consumer: Sunrisepeak/xrgui#8, which deletes its copies and the vulkan-1 search code in its build.mcpp.