Use -isysroot on Catalina too, not just Big Sur #7957
Merged
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.
I am writing a Zig program on macOS Catalina 10.15.7 that uses system frameworks.
Under Zig 0.7.1, I had to use this workaround otherwise it wouldn't find framework headers such as
#include <Carbon/Carbon.h>
:I then switched to tip-of-tree Zig (8661a13,
zig version
is0.8.0-dev.1118+8661a13b7
) which I built from source using Option A, and it stopped working — with or without my workaround. However, after applying this patch to make main.zig use-isysroot
on Catalina or later, it worked, and I don't need the workaround anymore.This was already done in #7506, but only for Big Sur or later. This PR just expands the check to include Catalina.
(Or, maybe we should just always attempt getSDKPath on macOS? Threads complaining about these headers moving go back years, so I'm not sure if Catalina is the earliest where it can happen.)
Related issues: #7697, #2208