Skip to content

Commit

Permalink
Merge pull request #400 from savi-lang/add/macosx-sdk-root
Browse files Browse the repository at this point in the history
Add support for `SDK_ROOT` env var when targetting MacOS.
  • Loading branch information
jemc authored Sep 21, 2022
2 parents 55b35f4 + 188caff commit f3db36a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/savi/compiler/binary.cr
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,8 @@ class Savi::Compiler::Binary
def each_sysroot_lib_glob(ctx, target)
# For MacOS, we have just one valid sysroot path, so we can finish early.
if target.macos?
yield "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib", nil
sdk_root = ENV["SDK_ROOT"]? || "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk"
yield "#{sdk_root}/usr/lib", nil
return
end

Expand Down

0 comments on commit f3db36a

Please sign in to comment.