Skip to content

Commit f162d6e

Browse files
res0nancesylvestre
authored andcommitted
Add support for -fsanitize-ignorelist
1 parent 9fb942e commit f162d6e

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/compiler/clang.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ counted_array!(pub static ARGS: [ArgInfo<gcc::ArgData>; _] = [
232232
// Note: this overrides the -fprofile-use option in gcc.rs.
233233
take_arg!("-fprofile-use", PathBuf, Concatenated('='), ClangProfileUse),
234234
take_arg!("-fsanitize-blacklist", PathBuf, Concatenated('='), ExtraHashFile),
235+
take_arg!("-fsanitize-ignorelist", PathBuf, Concatenated('='), ExtraHashFile),
235236
flag!("-fuse-ctor-homing", PassThroughFlag),
236237
take_arg!("-gcc-toolchain", OsString, Separated, PassThrough),
237238
flag!("-gcodeview", PassThroughFlag),
@@ -945,6 +946,22 @@ mod test {
945946
);
946947
}
947948

949+
#[test]
950+
fn test_parse_fsanitize_ignorelist() {
951+
let a = parses!(
952+
"-c",
953+
"foo.c",
954+
"-o",
955+
"foo.o",
956+
"-fsanitize-ignorelist=list.txt"
957+
);
958+
assert_eq!(ovec!["-fsanitize-ignorelist=list.txt"], a.common_args);
959+
assert_eq!(
960+
ovec![std::env::current_dir().unwrap().join("list.txt")],
961+
a.extra_hash_files
962+
);
963+
}
964+
948965
#[test]
949966
fn test_parse_color_diags() {
950967
let a = parses!("-c", "foo.c", "-o", "foo.o", "-fcolor-diagnostics");

0 commit comments

Comments
 (0)