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 @@ -310,7 +310,8 @@ fn link_rlib<'a>(
310
310
let ( metadata, metadata_position) =
311
311
create_wrapper_file ( sess, b".rmeta" . to_vec ( ) , codegen_results. metadata . raw_data ( ) ) ;
312
312
let metadata = emit_wrapper_file ( sess, & metadata, tmpdir, METADATA_FILENAME ) ;
313
- if sess. target . arch == "sbf" {
313
+ if sess. opts . cg . target_cpu . as_ref ( ) . unwrap_or (
314
+ & sess. target . cpu . as_ref ( ) . to_string ( ) ) == "sbfv2" {
314
315
patch_synthetic_object_file ( sess, & metadata) ;
315
316
}
316
317
match metadata_position {
@@ -1944,7 +1945,8 @@ fn add_linked_symbol_object(
1944
1945
if let Err ( error) = result {
1945
1946
sess. emit_fatal ( errors:: FailedToWrite { path, error } ) ;
1946
1947
}
1947
- if sess. target . arch == "sbf" {
1948
+ if sess. opts . cg . target_cpu . as_ref ( ) . unwrap_or (
1949
+ & sess. target . cpu . as_ref ( ) . to_string ( ) ) == "sbfv2" {
1948
1950
patch_synthetic_object_file ( sess, & path) ;
1949
1951
}
1950
1952
cmd. add_object ( & path) ;
You can’t perform that action at this time.
0 commit comments