Skip to content

Commit 12ac719

Browse files
committed
Pass target features to bpf-linker
1 parent cf5ac62 commit 12ac719

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

compiler/rustc_codegen_ssa/src/back/linker.rs

+4
Original file line numberDiff line numberDiff line change
@@ -1489,6 +1489,10 @@ impl<'a> Linker for BpfLinker<'a> {
14891489
Some(ref s) => s,
14901490
None => &self.sess.target.options.cpu,
14911491
});
1492+
self.cmd.arg("--cpu-features").arg(match &self.sess.opts.cg.target_feature {
1493+
feat if !feat.is_empty() => feat,
1494+
_ => &self.sess.target.options.features,
1495+
});
14921496
}
14931497

14941498
fn link_dylib(&mut self, _lib: Symbol, _verbatim: bool, _as_needed: bool) {

0 commit comments

Comments
 (0)