-
Notifications
You must be signed in to change notification settings - Fork 459
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use MACOSX_DEPLOYMENT_TARGET when set #708
Conversation
ea97a6c
to
f84b811
Compare
@Mark-Simulacrum Hi, you seem to maintained this repository recently. Could you review this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes a lot of other changes. Can you remove those (perhaps put them in a different PR)?
I think it's reasonable to take advantage of MACOSX_DEPLOYMENT_TARGET, but I don't think we should default to setting this to something old. I'd actually probably prefer we don't set it if not provided.
Alternatively, we could mirror the logic used by rustc_target, but I'd probably lean on not passing this if it is not set.
Also sorry for the delay here, this crate should be better maintained going forward.
Oh, I see, the other changes are from #703, which I hadn't seen yet. |
68d73ec
to
99f4211
Compare
I did it by respecting the policy for other platforms like IPHONEOS. if you want to make different policy for macos, I will change it. Please confirm you want it.
|
@thomcc could you review it again? |
I'm still getting familiar with this project so apologies if I'm misreading something. On line 2246, Bitcode is enabled if the platform is not Mac.
|
std::env::var("MACOSX_DEPLOYMENT_TARGET").unwrap_or_else(|_| { | ||
(if arch_str == "aarch64" { | ||
"11.0" | ||
} else { | ||
"10.7" | ||
}) | ||
.into() | ||
}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The rustc
PR for --print deployment-target
just landed (rust-lang/rust#105354), and should be available starting in 1.71 fyi. Ideally that would be queried for the version and then falling back to this hardcoded logic if the compiler is too old.
@colincornaby this PR is minimally invasive and doesn't actually change the existing behavior around bitcode; bitcode is already being unconditionally generated for all non-macOS Apple platforms on Line 2340 in 57853c4
Deciding how
As mentioned, this PR is minimally invasive and merely extends the existing behavior around Apple platforms to account for macOS as well. I've tested this PR, and it solves all of my build problems flawlessly. |
let is_mac = match os { | ||
Os::MacOs => true, | ||
_ => false, | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, I'm fine with this PR now. My complaints about the too old version were from an earlier version. I'd be fine with a rebased version of this. |
416eb10
to
4ca9210
Compare
I wish it can be merged at this time. This is now too old to remember what I thought at the moment. I'm afraid I cannot properly rebase it one day. |
I opened up #848 to further this PR's changes like said on a previous comment, so it also contains a rebased version of the commit here. Depending on which merges first, the rebase this branch needs (a one line print conflict) might be unnecessary. |
@BlackHoleFox Thank you! |
4ca9210
to
b1e566f
Compare
I rebased this PR just in case if it need to be merged first. |
It looks like my forward PR merged with these changes, so this one could be closed as done @youknowone |
Yeah this is done. Sorry for all the delays here. |
10.4 for c and 10.9 for c++10.7 for x86 and 11.0 for aarch64.
ref: https://github.com/rust-lang/rust/blob/6365e5ad9fa9e2ec867a67aeeae414e7c62d8354/compiler/rustc_target/src/spec/apple_base.rs#L105-L114
which referred in #703 (comment)