Stephen Gutekanst
5466375f40
glfw: fix caching bug in system_sdk that prevents cross-compilation in some situations
...
Prior to this change, cross-compiling Mach to other OSes was not working due to a regression.
e.g. to windows:
```
zig build -Dtarget=x86_64-windows run-example-boids
LLD Link... error(link): DLL import library for -ldxguid not found
error: DllImportLibraryNotFound
error: example-boids...
```
The problem was that one build step may invoke `getSdkRoot` and the target might be for say macOS,
since it's building e.g. GLFW for macOS as the target of tests, and `getSdkRoot` would cache the
SDK root _forever_ as being the macOS SDK (in an attempt to avoid running the various git commands
needed to resolve the SDK root multiple times, which slows builds down.)
We instead need to cache the SDK root per step, because the target may not be the same.
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-07-22 19:30:59 -07:00
alichraghi
48a4b9a7a6
glfw: use refAllDeclsRecursive to find mistakes
2022-07-20 18:55:59 -07:00
alichraghi
e6adc3e350
build: add mode paramater to testStep functions
2022-07-20 18:55:59 -07:00
alichraghi
d194dafb79
build: add test-mach step to test src/ and test for testing all sub-projects
2022-07-19 09:25:55 -07:00
Stephen Gutekanst
bbb276854b
all: update to Zig 0.10.0-dev.3027+0e26c6149
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-07-17 09:20:48 -07:00
iddev5
7a9b3de37a
glfw: Use i32 for position in Window.setMonitor
...
This partially reverts ``d3feaed ``
2022-07-09 15:07:55 -07:00
Jane Petrovna
04013379db
glfw: respect negative coordinates in window
2022-07-08 18:01:51 -07:00
Stephen Gutekanst
b9dd94698d
glfw: update macOS system_sdk to include AudioToolbox
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-07-01 19:05:27 -07:00
PiergiorgioZagaria
0e8b53d840
glfw: allow to choose platform in InitHints
2022-06-29 20:54:04 -07:00
PiergiorgioZagaria
bb503b6928
glfw: do not link to wayland-client (no longer necessary, loaded at runtime by GLFW)
2022-06-29 20:54:04 -07:00
PiergiorgioZagaria
d8f89efef2
glfw: update "getName" test comment
2022-06-29 20:54:04 -07:00
PiergiorgioZagaria
2692513ff1
glfw: disable "getName" test for now because of undefined behaviour in GLFW caught by UBSan
2022-06-29 20:54:04 -07:00
PiergiorgioZagaria
f92afebcb3
glfw: update system_sdk for wayland and catch wayland test errors
2022-06-29 20:54:04 -07:00
PiergiorgioZagaria
fee949c4a1
glfw: support compiling for wayland
2022-06-29 20:54:04 -07:00
PiergiorgioZagaria
7bb877bd55
glfw: support compiling with stage2 (-fno-stage1) ( #365 )
2022-06-24 10:12:45 -07:00
Daniel
786e0d6263
glfw: fix segfault in getPhysicalDevicePresentationSupport ( #364 )
2022-06-24 10:10:06 -07:00
Vulfox
f5affbe7ae
glfw: submodule path fix for subrepo
2022-06-15 06:59:56 -07:00
Caleb Gingles
e87d278f45
glfw: make MouseButton directly accessible, to match GLFW callback signature ( #353 )
2022-06-14 20:03:26 -07:00
Stephen Gutekanst
3549f6bc4d
glfw: update Linux system SDKs to include libxkbcommon-dev headers
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-06-11 17:39:25 -07:00
Stephen Gutekanst
35a9b45e59
glfw: prepare build system to support runtime Wayland/X11 detection
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-06-11 17:39:25 -07:00
Stephen Gutekanst
bdc12b367d
glfw: README: update usage example
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-06-11 17:39:25 -07:00
Stephen Gutekanst
49f5a26823
glfw: README: mention that we are now tracking glfw@master
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-06-11 17:39:25 -07:00
Stephen Gutekanst
c45a717a38
glfw: add TODO about glfw@master custom allocator API
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-06-11 17:39:25 -07:00
Stephen Gutekanst
21307a9d1d
glfw: update time documentation to glfw@master
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-06-11 17:39:25 -07:00
Stephen Gutekanst
24f4a9d1c3
glfw: update key documentation to glfw@master
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-06-11 17:39:25 -07:00
Stephen Gutekanst
5b4b31de13
glfw: update core APIs to glfw@master
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-06-11 17:39:25 -07:00
Stephen Gutekanst
2db01e1a32
glfw: update native APIs to glfw@master
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-06-11 17:39:25 -07:00
Stephen Gutekanst
199a3dce78
glfw: update windowing API to glfw@master
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-06-11 17:39:25 -07:00
Stephen Gutekanst
1dd27fd904
glfw: update monitor API to glfw@master
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-06-11 17:39:25 -07:00
Stephen Gutekanst
174d244433
glfw: update cursor API to glfw@master
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-06-11 17:39:25 -07:00
Stephen Gutekanst
4f61a4e3c6
glfw: update build system to glfw@master
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-06-11 17:39:25 -07:00
Stephen Gutekanst
131caa4cb7
glfw: ensure upstream submodule is cloned
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-06-11 17:39:25 -07:00
Stephen Gutekanst
214d4cfd6a
glfw: upgrade to GLFW@master; add upstream submodule https://github.com/hexops/glfw
...
This upgrades us to the latest master (pre-release) version of GLFW which has our patches
for undefined behavior in Zig, effectively moving us off of our temporary fork. We now track
GLFW upstream at the revision documented in https://github.com/hexops/glfw/blob/main/VERSION
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
Co-authored-by: Cai Bingjun <1945458160@qq.com>
2022-06-11 17:39:25 -07:00
Stephen Gutekanst
3dd8d028d9
glfw: stop vendoring upstream sources
...
Moving to the same model we use elsewhere: we now have https://github.com/hexops/glfw
which is a tiny repository with only the sources needed to compile/build/test GLFW on
every platform. It's just the upstream repository at a specific commit, recorded in
the `VERSION` file.
Helps hexops/mach#343
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-06-11 17:39:25 -07:00
iddev5
d3feaed383
glfw: Window: use u32 values for params in setMonitor method
2022-06-11 16:00:02 -07:00
Stephen Gutekanst
322ead9218
CI: ZIG_VERSION=0.10.0-dev.2439+c84f5a5f9 ./dev/update-zig.sh
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-05-31 05:02:04 -07:00
Stephen Gutekanst
1eab0539d1
CI: correct M1 runner Zig version
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-05-31 04:11:43 -07:00
Stephen Gutekanst
c2111e0691
CI: ZIG_VERSION=0.10.0-dev.2439+c84f5a5f9 ./dev/update-zig.sh
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-05-31 03:39:45 -07:00
Stephen Gutekanst
3a81754973
CI: ZIG_VERSION=0.10.0-dev.2439+c84f5a5f9 ./dev/update-zig.sh
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-05-31 03:24:34 -07:00
Stephen Gutekanst
d3680b6394
glfw: CI: always upgrade Zig M1 CI version
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-05-31 03:24:34 -07:00
Stephen Gutekanst
bfbc725f0e
glfw: CI: standardize M1 CI name
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-05-31 03:24:34 -07:00
d3m1gd
25022a1471
glfw: move git check
2022-05-30 10:24:09 -07:00
d3m1gd
5549388e57
glfw: ensure git present
2022-05-30 10:24:09 -07:00
kamidev
68190e863a
Change std.build.Pkg.path -> std.build.Pkg.source
...
Fixes breaking change in latest Zig master, see https://github.com/ziglang/zig/pull/11557
2022-05-29 08:25:52 -07:00
Lee Cannon
4570838304
Update to latest Zig master (0.10.0-dev.2017+a0a2ce92c) ( #261 )
...
* use `@ceil` instead of `std.math.ceil`
* `ChildProcess.init` does not allocate anymore
* update CI zig version
* examples: temporarily switch to fork of zigimg compatible with zig-master
Commands executed:
```
git submodule set-url -- examples/libs/zigimg https://github.com/slimsag/zigimg
git submodule set-branch --branch zig-master -- examples/libs/zigimg
git submodule update --init --remote examples/libs/zigimg
```
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
Co-authored-by: Stephen Gutekanst <stephen@hexops.com>
2022-05-01 11:44:27 -07:00
Stephen Gutekanst
89c9c6c8e1
CI: correct YAML syntax / regression
...
Helps hexops/mach#248
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-04-21 03:41:38 -07:00
Stephen Gutekanst
7ebe8cde5e
glfw: zig fmt
...
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-04-20 23:01:39 -07:00
iddev5
bb65083561
CI: dont run aarch64-mac workflow on forks
...
The workflow uses a self hosted runner which is only available for
hexops/mach* repositories. Without this commit, whenever a fork of mach
or mach-* were pushed, it would queue an aarch64-mac job and then crash
after one day due to no machines being found.
2022-04-19 20:12:22 -07:00
Stephen Gutekanst
b2ac779180
glfw: update vulkan headers to latest (adds v1.3 support)
...
Produced via `./update-upstream.sh`
Helps hexops/mach#236
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
2022-04-18 20:44:34 -07:00
iddev5
27146af8ce
glfw: add getErrorString() to access the current error description
2022-04-17 10:49:05 -07:00