Pass target features to bpf-linker
This commit is contained in:
parent
cf5ac6228c
commit
12ac719b99
1 changed files with 4 additions and 0 deletions
|
@ -1489,6 +1489,10 @@ impl<'a> Linker for BpfLinker<'a> {
|
||||||
Some(ref s) => s,
|
Some(ref s) => s,
|
||||||
None => &self.sess.target.options.cpu,
|
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) {
|
fn link_dylib(&mut self, _lib: Symbol, _verbatim: bool, _as_needed: bool) {
|
||||||
|
|
Loading…
Reference in a new issue