File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -40,7 +40,7 @@ use std::sync::Arc;
4040use cranelift_codegen:: isa:: TargetIsa ;
4141use cranelift_codegen:: settings:: { self , Configurable } ;
4242use rustc_codegen_ssa:: traits:: CodegenBackend ;
43- use rustc_codegen_ssa:: { CompiledModules , CrateInfo , TargetConfig } ;
43+ use rustc_codegen_ssa:: { CompiledModules , CrateInfo , TargetConfig , back } ;
4444use rustc_log:: tracing:: info;
4545use rustc_middle:: dep_graph:: { WorkProduct , WorkProductId } ;
4646use rustc_session:: Session ;
@@ -244,7 +244,9 @@ fn enable_verifier(sess: &Session) -> bool {
244244}
245245
246246fn target_triple ( sess : & Session ) -> target_lexicon:: Triple {
247- match sess. target . llvm_target . parse ( ) {
247+ // Use versioned target triple to make `OperatingSystem::MacOSX(...)`
248+ // contain a value, which we use when emitting `LC_BUILD_VERSION`.
249+ match back:: versioned_llvm_target ( sess) . parse ( ) {
248250 Ok ( triple) => triple,
249251 Err ( err) => sess. dcx ( ) . fatal ( format ! ( "target not recognized: {}" , err) ) ,
250252 }
You can’t perform that action at this time.
0 commit comments