diff --git a/build/macosx/xcrun b/build/macosx/xcrun new file mode 100755 index 000000000000..7642586e3095 --- /dev/null +++ b/build/macosx/xcrun @@ -0,0 +1,10 @@ +#!/bin/sh + +case "$*" in +"--show-sdk-path --sdk iphoneos"|"--show-sdk-path -sdk iphoneos") + ;; +*) + echo We only expect this to be executed by third_party/rust/cc/src/lib.rs or rustc when targetting iOS >&2 + exit 1 +esac +echo $IPHONEOS_SDK_DIR diff --git a/config/makefiles/rust.mk b/config/makefiles/rust.mk index 5fdd6d937375..b10594f5cb8f 100644 --- a/config/makefiles/rust.mk +++ b/config/makefiles/rust.mk @@ -254,6 +254,9 @@ export COREAUDIO_SDK_PATH=$(MACOS_SDK_DIR) endif ifdef IPHONEOS_SDK_DIR export COREAUDIO_SDK_PATH=$(IPHONEOS_SDK_DIR) +# export for build/macosx/xcrun +export IPHONEOS_SDK_DIR +PATH := $(topsrcdir)/build/macosx:$(PATH) endif endif