refactor: Move env parsing of deployment target to rustc_session
This commit is contained in:
@@ -3115,7 +3115,7 @@ fn add_apple_link_args(cmd: &mut dyn Linker, sess: &Session, flavor: LinkerFlavo
|
||||
_ => bug!("invalid OS/ABI combination for Apple target: {target_os}, {target_abi}"),
|
||||
};
|
||||
|
||||
let min_version = apple::deployment_target(sess).fmt_full().to_string();
|
||||
let min_version = sess.apple_deployment_target().fmt_full().to_string();
|
||||
|
||||
// The SDK version is used at runtime when compiling with a newer SDK / version of Xcode:
|
||||
// - By dyld to give extra warnings and errors, see e.g.:
|
||||
@@ -3184,7 +3184,7 @@ fn add_apple_link_args(cmd: &mut dyn Linker, sess: &Session, flavor: LinkerFlavo
|
||||
|
||||
// The presence of `-mmacosx-version-min` makes CC default to
|
||||
// macOS, and it sets the deployment target.
|
||||
let version = apple::deployment_target(sess).fmt_full();
|
||||
let version = sess.apple_deployment_target().fmt_full();
|
||||
// Intentionally pass this as a single argument, Clang doesn't
|
||||
// seem to like it otherwise.
|
||||
cmd.cc_arg(&format!("-mmacosx-version-min={version}"));
|
||||
|
||||
Reference in New Issue
Block a user