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>(
309
309
codegen_results. metadata . raw_data ( ) ,
310
310
) ;
311
311
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" {
313
314
patch_synthetic_object_file ( sess, & metadata) ;
314
315
}
315
316
match metadata_position {
@@ -2113,7 +2114,8 @@ fn add_linked_symbol_object(
2113
2114
if let Err ( error) = result {
2114
2115
sess. dcx ( ) . emit_fatal ( errors:: FailedToWrite { path, error } ) ;
2115
2116
}
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" {
2117
2119
patch_synthetic_object_file ( sess, & path) ;
2118
2120
}
2119
2121
cmd. add_object ( & path) ;
You can’t perform that action at this time.
0 commit comments