Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update system_sdk to reflect new Zig macOS version targeting #102

Closed
3 tasks done
Tracked by #95
slimsag opened this issue Nov 26, 2021 · 0 comments · Fixed by #107
Closed
3 tasks done
Tracked by #95

update system_sdk to reflect new Zig macOS version targeting #102

slimsag opened this issue Nov 26, 2021 · 0 comments · Fixed by #107
Labels
Milestone

Comments

@slimsag
Copy link
Member

slimsag commented Nov 26, 2021

Since ziglang/zig#10215 Zig will ship versioned libc headers and allow specifying the following target triples for macOS:

* supported triples:
  
  * x86_64-macos.10 (Catalina)
  * x86_64-macos.11 (Big Sur)
  * x86_64-macos.12 (Monterey)
  * aarch64-macos.11 (Big Sur)
  * aarch64-macos.12 (Monterey)

We should reflect this change by:

  1. Revert the temporary hack to allow compilation with macOS 12 frameworks 7d47233
  2. Default to the same macOS version as Zig (well, in reality Zig defaults to 10 but we only have an 11 SDK, so we'll default to that even when Zig targets 10 which is fine and we know works. In the future, we'll continue to target the same SDK as Zig)
  3. When the target triple is -macos.12, have system_sdk.zig detect that and use the new https://github.com/hexops/sdk-macos-12.0
@slimsag slimsag added the build label Nov 26, 2021
@slimsag slimsag changed the title update system_sdk to reflect new Zig macOS version targetting update system_sdk to reflect new Zig macOS version targeting Nov 26, 2021
slimsag added a commit that referenced this issue Nov 27, 2021
…eting

The latest Zig master supports specifying a specific macOS version for libc, via
the target triple (ziglang/zig#10215):

* x86_64-macos.10 (Catalina)
* x86_64-macos.11 (Big Sur)
* x86_64-macos.12 (Monterey)
* aarch64-macos.11 (Big Sur)
* aarch64-macos.12 (Monterey)

Mach's `system_sdk.zig` can now download the relevant XCode framework stubs
for Big Sur (11) and Monterey (12). We do not support Catalina (10) currently.
By default, Zig targets the N-3 version (e.g. `x86_64-macos` defaults to `x86_64-macos.10`).

Targeting the older version (`<arch>-macos.11`) is useful for compatability, it
guarantees the produced binary will run on macOS 11+. Targeting the newer version
can be useful if you wish to use newer APIs not available in previous versions.

Fixes #102

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
slimsag added a commit that referenced this issue Nov 27, 2021
slimsag added a commit that referenced this issue Nov 27, 2021
…eting

The latest Zig master supports specifying a specific macOS version for libc, via
the target triple (ziglang/zig#10215):

* x86_64-macos.10 (Catalina)
* x86_64-macos.11 (Big Sur)
* x86_64-macos.12 (Monterey)
* aarch64-macos.11 (Big Sur)
* aarch64-macos.12 (Monterey)

Mach's `system_sdk.zig` can now download the relevant XCode framework stubs
for Big Sur (11) and Monterey (12). Although we don't have an SDK for Catalina (10)
currently, we use the Big Sur (11) SDK in that case and it generally works fine.
By default, Zig targets the N-3 version (e.g. `x86_64-macos` defaults to `x86_64-macos.10`).

Targeting the minimum supported version is useful for compatability, it guarantees the produced
binary will run on any later macOS version. Targeting the newer version can be useful if you
wish to use newer APIs not available in previous versions.

Fixes #102

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
slimsag added a commit that referenced this issue Nov 27, 2021
slimsag added a commit that referenced this issue Nov 27, 2021
…eting

The latest Zig master supports specifying a specific macOS version for libc, via
the target triple (ziglang/zig#10215):

* x86_64-macos.10 (Catalina)
* x86_64-macos.11 (Big Sur)
* x86_64-macos.12 (Monterey)
* aarch64-macos.11 (Big Sur)
* aarch64-macos.12 (Monterey)

Mach's `system_sdk.zig` can now download the relevant XCode framework stubs
for Big Sur (11) and Monterey (12). Although we don't have an SDK for Catalina (10)
currently, we use the Big Sur (11) SDK in that case and it generally works fine.
By default, Zig targets the N-3 version (e.g. `x86_64-macos` defaults to `x86_64-macos.10`).

Targeting the minimum supported version is useful for compatability, it guarantees the produced
binary will run on any later macOS version. Targeting the newer version can be useful if you
wish to use newer APIs not available in previous versions.

Fixes #102

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
slimsag added a commit that referenced this issue Nov 27, 2021
slimsag added a commit to hexops/mach-glfw that referenced this issue Dec 7, 2021
…eting

The latest Zig master supports specifying a specific macOS version for libc, via
the target triple (ziglang/zig#10215):

* x86_64-macos.10 (Catalina)
* x86_64-macos.11 (Big Sur)
* x86_64-macos.12 (Monterey)
* aarch64-macos.11 (Big Sur)
* aarch64-macos.12 (Monterey)

Mach's `system_sdk.zig` can now download the relevant XCode framework stubs
for Big Sur (11) and Monterey (12). Although we don't have an SDK for Catalina (10)
currently, we use the Big Sur (11) SDK in that case and it generally works fine.
By default, Zig targets the N-3 version (e.g. `x86_64-macos` defaults to `x86_64-macos.10`).

Targeting the minimum supported version is useful for compatability, it guarantees the produced
binary will run on any later macOS version. Targeting the newer version can be useful if you
wish to use newer APIs not available in previous versions.

Fixes hexops/mach#102

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
slimsag added a commit to hexops/mach-glfw that referenced this issue Dec 7, 2021
…ch C headers conflict"

This reverts commit 7d47233d7a5a97241ad16a148c153831ce5d555d.

See hexops/mach#102
@slimsag slimsag added this to the Mach 0.1 milestone Mar 19, 2022
slimsag added a commit to hexops/mach-glfw that referenced this issue Aug 26, 2022
…eting

The latest Zig master supports specifying a specific macOS version for libc, via
the target triple (ziglang/zig#10215):

* x86_64-macos.10 (Catalina)
* x86_64-macos.11 (Big Sur)
* x86_64-macos.12 (Monterey)
* aarch64-macos.11 (Big Sur)
* aarch64-macos.12 (Monterey)

Mach's `system_sdk.zig` can now download the relevant XCode framework stubs
for Big Sur (11) and Monterey (12). Although we don't have an SDK for Catalina (10)
currently, we use the Big Sur (11) SDK in that case and it generally works fine.
By default, Zig targets the N-3 version (e.g. `x86_64-macos` defaults to `x86_64-macos.10`).

Targeting the minimum supported version is useful for compatability, it guarantees the produced
binary will run on any later macOS version. Targeting the newer version can be useful if you
wish to use newer APIs not available in previous versions.

Fixes hexops/mach#102

Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
slimsag added a commit to hexops/mach-glfw that referenced this issue Aug 26, 2022
…ch C headers conflict"

This reverts commit 7d47233d7a5a97241ad16a148c153831ce5d555d.

See hexops/mach#102
slimsag added a commit to hexops/mach-glfw that referenced this issue Aug 26, 2022
…ch C headers conflict"

This reverts commit 05ee92ca9b4940e4f97286a14d0a6b5ddd7408a9.

See hexops/mach#102
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant