add (#1276)
This commit is contained in:
parent
66127d8492
commit
3fd5671909
@ -381,6 +381,13 @@ impl CompilerWrapper for ClangWrapper {
|
|||||||
self.linking
|
self.linking
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fn filter(&self, args: &mut Vec<String>) {
|
||||||
|
let blacklist = ["-Werror=unused-command-line-argument"];
|
||||||
|
for item in blacklist {
|
||||||
|
args.retain(|x| x.clone() != item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
fn silence(&mut self, value: bool) -> &'_ mut Self {
|
fn silence(&mut self, value: bool) -> &'_ mut Self {
|
||||||
self.is_silent = value;
|
self.is_silent = value;
|
||||||
self
|
self
|
||||||
|
@ -157,6 +157,9 @@ pub trait CompilerWrapper {
|
|||||||
/// Get if in linking mode
|
/// Get if in linking mode
|
||||||
fn is_linking(&self) -> bool;
|
fn is_linking(&self) -> bool;
|
||||||
|
|
||||||
|
/// Filter out argumets
|
||||||
|
fn filter(&self, _args: &mut Vec<String>) {}
|
||||||
|
|
||||||
/// Silences `libafl_cc` output
|
/// Silences `libafl_cc` output
|
||||||
fn silence(&mut self, value: bool) -> &'_ mut Self;
|
fn silence(&mut self, value: bool) -> &'_ mut Self;
|
||||||
|
|
||||||
@ -165,7 +168,8 @@ pub trait CompilerWrapper {
|
|||||||
|
|
||||||
/// Run the compiler
|
/// Run the compiler
|
||||||
fn run(&mut self) -> Result<Option<i32>, Error> {
|
fn run(&mut self) -> Result<Option<i32>, Error> {
|
||||||
let args = self.command()?;
|
let mut args = self.command()?;
|
||||||
|
self.filter(&mut args);
|
||||||
|
|
||||||
if !self.is_silent() {
|
if !self.is_silent() {
|
||||||
dbg!(args.clone());
|
dbg!(args.clone());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user