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>(
310310 let ( metadata, metadata_position) =
311311 create_wrapper_file ( sess, b".rmeta" . to_vec ( ) , codegen_results. metadata . raw_data ( ) ) ;
312312 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" {
314315 patch_synthetic_object_file ( sess, & metadata) ;
315316 }
316317 match metadata_position {
@@ -1944,7 +1945,8 @@ fn add_linked_symbol_object(
19441945 if let Err ( error) = result {
19451946 sess. emit_fatal ( errors:: FailedToWrite { path, error } ) ;
19461947 }
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" {
19481950 patch_synthetic_object_file ( sess, & path) ;
19491951 }
19501952 cmd. add_object ( & path) ;
You can’t perform that action at this time.
0 commit comments