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 @@ -311,7 +311,8 @@ fn link_rlib<'a>(
311
311
codegen_results. metadata . raw_data ( ) ,
312
312
) ;
313
313
let metadata = emit_wrapper_file ( sess, & metadata, tmpdir, METADATA_FILENAME ) ;
314
- if sess. target . arch == "sbf" {
314
+ if sess. opts . cg . target_cpu . as_ref ( ) . unwrap_or (
315
+ & sess. target . cpu . as_ref ( ) . to_string ( ) ) == "sbfv2" {
315
316
patch_synthetic_object_file ( sess, & metadata) ;
316
317
}
317
318
match metadata_position {
@@ -2016,7 +2017,8 @@ fn add_linked_symbol_object(
2016
2017
if let Err ( error) = result {
2017
2018
sess. dcx ( ) . emit_fatal ( errors:: FailedToWrite { path, error } ) ;
2018
2019
}
2019
- if sess. target . arch == "sbf" {
2020
+ if sess. opts . cg . target_cpu . as_ref ( ) . unwrap_or (
2021
+ & sess. target . cpu . as_ref ( ) . to_string ( ) ) == "sbfv2" {
2020
2022
patch_synthetic_object_file ( sess, & path) ;
2021
2023
}
2022
2024
cmd. add_object ( & path) ;
You can’t perform that action at this time.
0 commit comments