diff options
| author | Mads Marquart <mads@marquart.dk> | 2024-11-01 17:07:18 +0100 |
|---|---|---|
| committer | Mads Marquart <mads@marquart.dk> | 2024-11-01 17:07:18 +0100 |
| commit | e1233153ac2dcc68013f9698430ac27c7abec099 (patch) | |
| tree | d5d64bb039d9b54bbeda5513bfe6a29e35a7bfba /compiler/rustc_driver_impl | |
| parent | 20c909ff9cdd88d33768a4ddb8952927a675b0ad (diff) | |
| download | rust-e1233153ac2dcc68013f9698430ac27c7abec099.tar.gz rust-e1233153ac2dcc68013f9698430ac27c7abec099.zip | |
Move versioned LLVM target creation to rustc_codegen_ssa
The OS version depends on the deployment target environment variables, the access of which we want to move to later in the compilation pipeline that has access to more information, for example `env_depinfo`.
Diffstat (limited to 'compiler/rustc_driver_impl')
| -rw-r--r-- | compiler/rustc_driver_impl/src/lib.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/rustc_driver_impl/src/lib.rs b/compiler/rustc_driver_impl/src/lib.rs index e2585c02388..06b4c89946d 100644 --- a/compiler/rustc_driver_impl/src/lib.rs +++ b/compiler/rustc_driver_impl/src/lib.rs @@ -33,6 +33,7 @@ use std::time::{Instant, SystemTime}; use std::{env, str}; use rustc_ast as ast; +use rustc_codegen_ssa::back::apple; use rustc_codegen_ssa::traits::CodegenBackend; use rustc_codegen_ssa::{CodegenErrors, CodegenResults}; use rustc_data_structures::profiling::{ @@ -855,10 +856,8 @@ fn print_crate_info( } } DeploymentTarget => { - use rustc_target::spec::current_apple_deployment_target; - if sess.target.is_like_osx { - let (major, minor, patch) = current_apple_deployment_target(&sess.target); + let (major, minor, patch) = apple::deployment_target(sess); let patch = if patch != 0 { format!(".{patch}") } else { String::new() }; println_info!("deployment_target={major}.{minor}{patch}") } else { |
