Skip to content

Commit

Permalink
Add support for clang '-fuse-ctor-homing' flag
Browse files Browse the repository at this point in the history
  • Loading branch information
robertgzr authored and sylvestre committed Jan 9, 2023
1 parent 762f5c6 commit 1a82863
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/compiler/clang.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ counted_array!(pub static ARGS: [ArgInfo<gcc::ArgData>; _] = [
// Note: this overrides the -fprofile-use option in gcc.rs.
take_arg!("-fprofile-use", PathBuf, Concatenated('='), ClangProfileUse),
take_arg!("-fsanitize-blacklist", PathBuf, Concatenated('='), ExtraHashFile),
flag!("-fuse-ctor-homing", PassThroughFlag),
take_arg!("-gcc-toolchain", OsString, Separated, PassThrough),
flag!("-gcodeview", PassThroughFlag),
take_arg!("-include-pch", PathBuf, CanBeSeparated, PreprocessorArgumentPath),
Expand Down Expand Up @@ -550,6 +551,12 @@ mod test {
assert_eq!(ovec!["-Xclang", "-no-opaque-pointers"], a.preprocessor_args);
}

#[test]
fn test_parse_xclang_use_ctor_homing() {
let a = parses!("-c", "foo.c", "-o", "foo.o", "-Xclang", "-fuse-ctor-homing");
assert_eq!(ovec!["-Xclang", "-fuse-ctor-homing"], a.common_args);
}

#[test]
fn test_parse_fplugin() {
let a = parses!("-c", "foo.c", "-o", "foo.o", "-fplugin", "plugin.so");
Expand Down

0 comments on commit 1a82863

Please sign in to comment.