Closed madsmtm closed 4 months ago
We were definitely working on the same thing; I made almost the same changes. The only differences are the XROS_DEPLOYMENT_TARGET and this additional check on lines 2658 and 2674
// there is no -m{}os-version-min for watchos, tvos, visionos
if matches!(os, AppleOs::Ios | AppleOs::MacOs) {
cmd.args.push(
format!("-m{}os-version-min={}", sdk_details.sdk_prefix, min_version)
.into(),
);
}
there is no -m{}os-version-min for watchos, tvos, visionos
There is, see Clang's docs for the availability
attribute and Clang's docs for e.g. the -mtvos-version-min
flag itself.
However, you right that it does not exist for visionOS, I've opened https://github.com/llvm/llvm-project/issues/88271 for that. This is somewhat problematic, as we need to tell Clang about the desired deployment target. Perhaps we can set XROS_DEPLOYMENT_TARGET
? Or maybe -mtargetos=xros1.0
?
Using just --target
is recommended by Clang Driver developers, which we already do, so I think that is a non-issue.
Have opened https://github.com/rust-lang/cc-rs/issues/1030 to track removing the other flags from Apple targets.
Thank you!
I haven't added this to CI, as the Rust builds themselves are still somewhat broken until https://github.com/rust-lang/libc/pull/3568 lands.
CC @BlackHoleFox