Skip to content

Commit e61660c

Browse files
dmakarovLucasSte
authored andcommitted
[SOL] Temporarily patch BPF ELF file header only for SBFv2 cpu
1 parent 37a140c commit e61660c

File tree

1 file changed

+2
-1
lines changed
  • compiler/rustc_codegen_ssa/src/back

1 file changed

+2
-1
lines changed

compiler/rustc_codegen_ssa/src/back/link.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2064,7 +2064,8 @@ fn add_linked_symbol_object(
20642064
if let Err(error) = result {
20652065
sess.dcx().emit_fatal(errors::FailedToWrite { path, error });
20662066
}
2067-
if sess.target.arch == "sbf" {
2067+
if sess.opts.cg.target_cpu.as_ref().unwrap_or(
2068+
&sess.target.cpu.as_ref().to_string()) == "sbfv2" {
20682069
patch_synthetic_object_file(sess, &path);
20692070
}
20702071
cmd.add_object(&path);

0 commit comments

Comments
 (0)