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>(
311311 codegen_results. metadata . raw_data ( ) ,
312312 ) ;
313313 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" {
315316 patch_synthetic_object_file ( sess, & metadata) ;
316317 }
317318 match metadata_position {
@@ -2016,7 +2017,8 @@ fn add_linked_symbol_object(
20162017 if let Err ( error) = result {
20172018 sess. dcx ( ) . emit_fatal ( errors:: FailedToWrite { path, error } ) ;
20182019 }
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" {
20202022 patch_synthetic_object_file ( sess, & path) ;
20212023 }
20222024 cmd. add_object ( & path) ;
You can’t perform that action at this time.
0 commit comments