File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
compiler/rustc_codegen_ssa/src/back Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -309,7 +309,8 @@ fn link_rlib<'a>(
309309 codegen_results. metadata . raw_data ( ) ,
310310 ) ;
311311 let metadata = emit_wrapper_file ( sess, & metadata, tmpdir, METADATA_FILENAME ) ;
312- if sess. target . arch == "sbf" {
312+ if sess. opts . cg . target_cpu . as_ref ( ) . unwrap_or (
313+ & sess. target . cpu . as_ref ( ) . to_string ( ) ) == "sbfv2" {
313314 patch_synthetic_object_file ( sess, & metadata) ;
314315 }
315316 match metadata_position {
@@ -2113,7 +2114,8 @@ fn add_linked_symbol_object(
21132114 if let Err ( error) = result {
21142115 sess. dcx ( ) . emit_fatal ( errors:: FailedToWrite { path, error } ) ;
21152116 }
2116- if sess. target . arch == "sbf" {
2117+ if sess. opts . cg . target_cpu . as_ref ( ) . unwrap_or (
2118+ & sess. target . cpu . as_ref ( ) . to_string ( ) ) == "sbfv2" {
21172119 patch_synthetic_object_file ( sess, & path) ;
21182120 }
21192121 cmd. add_object ( & path) ;
You can’t perform that action at this time.
0 commit comments