We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a4ff823 commit 287db19Copy full SHA for 287db19
src/librustc_target/spec/apple_ios_base.rs
@@ -29,6 +29,12 @@ impl Arch {
29
}
30
31
pub fn get_sdk_root(sdk_name: &str) -> Result<String, String> {
32
+ // Following what clang does
33
+ // (https://github.com/llvm/llvm-project/blob/
34
+ // 296a80102a9b72c3eda80558fb78a3ed8849b341/clang/lib/Driver/ToolChains/Darwin.cpp#L1661-L1678)
35
+ // to allow the SDK path to be set. (For clang, xcrun sets
36
+ // SDKROOT; for rustc, the user or build system can set it, or we
37
+ // can fall back to checking for xcrun on PATH.)
38
if let Some(sdkroot) = env::var("SDKROOT").ok() {
39
let sdkroot_path = Path::new(&sdkroot);
40
if sdkroot_path.is_absolute() && sdkroot_path != Path::new("/") && sdkroot_path.exists() {
0 commit comments