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 @@ -314,7 +314,8 @@ fn link_rlib<'a>(
314
314
codegen_results. metadata . raw_data ( ) ,
315
315
) ;
316
316
let metadata = emit_wrapper_file ( sess, & metadata, tmpdir, METADATA_FILENAME ) ;
317
- if sess. target . arch == "sbf" {
317
+ if sess. opts . cg . target_cpu . as_ref ( ) . unwrap_or (
318
+ & sess. target . cpu . as_ref ( ) . to_string ( ) ) == "sbfv2" {
318
319
patch_synthetic_object_file ( sess, & metadata) ;
319
320
}
320
321
match metadata_position {
@@ -2072,7 +2073,8 @@ fn add_linked_symbol_object(
2072
2073
if let Err ( error) = result {
2073
2074
sess. dcx ( ) . emit_fatal ( errors:: FailedToWrite { path, error } ) ;
2074
2075
}
2075
- if sess. target . arch == "sbf" {
2076
+ if sess. opts . cg . target_cpu . as_ref ( ) . unwrap_or (
2077
+ & sess. target . cpu . as_ref ( ) . to_string ( ) ) == "sbfv2" {
2076
2078
patch_synthetic_object_file ( sess, & path) ;
2077
2079
}
2078
2080
cmd. add_object ( & path) ;
You can’t perform that action at this time.
0 commit comments