Skip to content

Commit 7147508

Browse files
committed
Added SDKROOT env. var.
1 parent 7800b17 commit 7147508

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Runner.jl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1003,7 +1003,7 @@ function generate_compiler_wrappers!(platform::AbstractPlatform; bin_path::Abstr
10031003
write(xcrun_path, """
10041004
#!/bin/sh
10051005
1006-
sdk_path=/opt/\$target/\$target/sys-root
1006+
sdk_path=\$SDKROOT
10071007
10081008
show_sdk_path() {
10091009
echo "\$1"
@@ -1017,6 +1017,10 @@ function generate_compiler_wrappers!(platform::AbstractPlatform; bin_path::Abstr
10171017
10181018
while [ \$# -gt 0 ]; do
10191019
case "\$1" in
1020+
--sdk)
1021+
sdk_path=\$2
1022+
shift 2
1023+
;;
10201024
--show-sdk-path)
10211025
show_sdk_path \$sdk_path
10221026
shift
@@ -1286,6 +1290,7 @@ function platform_envs(platform::AbstractPlatform, src_name::AbstractString;
12861290
if Sys.isapple(platform)
12871291
mapping["LD"] = "/opt/bin/$(triplet(platform))/ld"
12881292
mapping["MACOSX_DEPLOYMENT_TARGET"] = macos_version(platform)
1293+
mapping["SDKROOT"] = "/opt/$(triplet(platform))/$(triplet(platform))/sys-root"
12891294
end
12901295

12911296
# There is no broad agreement on what host compilers should be called,

0 commit comments

Comments
 (0)