glfw: build for wayland *and* X11 by default #374
No reviewers
Labels
No labels
CI
all
basisu
blog
bug
build
contributor-friendly
core
correctness
deferred
dev
direct3d-headers
docs
driver-os-issue
duplicate
dxcompiler
editor
examples
experiment
feature-idea
feedback
flac
freetype
gamemode
gkurve
glfw
gpu
gpu-dawn
harfbuzz
help welcome
in-progress
infrastructure
invalid
libmach
linux-audio-headers
long-term
mach
mach.gfx
mach.math
mach.physics
mach.testing
model3d
needs-triage
object
opengl-headers
opus
os/linux
os/macos
os/wasm
os/windows
package-manager
priority
proposal
proposal-accepted
question
roadmap
slipped
stability
sysaudio
sysgpu
sysjs
validating-fix
vulkan-zig-generated
wayland-headers
website
wontfix
wrench
www
x11-headers
xcode-frameworks
zig-update
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
hexops/mach!374
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "main"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Helps hexops/mach#374 and hexops/mach#376
To get this error I set
x11 = falsein the build options, otherwise glfw would use X11 instead of wayland.Also, all tests from 10 to 133 print
mesa: for the --amdgpu-atomic-optimizations option: may only occur zero or one times!.The errors are:
Test [46/138] Monitor.test "set_getGammaRamp"the documentation seems to be wrong, since on wayland the returned error isFeatureUnavailableand notPlatformErrorTest [49/138] key.test "getName", the c function segfaults on waylandTest [81/138] Window.test "setAspectRatio"returns errorFeatureUnimplementedTest [89/138] Window.test "show"like the first error,FeatureUnavailableis returned instead ofPlatformErrorTest [92/138] Window.test "requestAttention"returns errorFeatureUnimplementedWe should update the tests to catch those errors and print them.
We do this in other places, e.g. here
I suspect this is more undefined behavior being caught by Zig/UBSan, I can dig into it later. Presumably it works if you do a release-fast build
What do we do about test 49? Since it segfaults there isn't anything to catch
Let's just comment it out for now and add:
Looks good, thanks a ton again for doing this!
CI shows this is failing to cross-compile from macOS/Windows:
It looks like linking to
wayland-clientis no longer necessary, though, because GLFW loads it at runtime now. I am pretty sure we can just remove that line entirely from build.zig?LGTM, thanks! I did a
git rebase -i origin/mainand force pushed to clean up the history a bit, hope that's okay.Awesome work!