Skip to content

Commit

Permalink
Pass target features to bpf-linker
Browse files Browse the repository at this point in the history
  • Loading branch information
alessandrod committed May 23, 2021
1 parent cf5ac62 commit 12ac719
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions compiler/rustc_codegen_ssa/src/back/linker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1489,6 +1489,10 @@ impl<'a> Linker for BpfLinker<'a> {
Some(ref s) => s,
None => &self.sess.target.options.cpu,
});
self.cmd.arg("--cpu-features").arg(match &self.sess.opts.cg.target_feature {
feat if !feat.is_empty() => feat,
_ => &self.sess.target.options.features,
});
}

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

0 comments on commit 12ac719

Please sign in to comment.