diff --git a/src/compiler/clang.rs b/src/compiler/clang.rs index e6294d524..bd7a98009 100644 --- a/src/compiler/clang.rs +++ b/src/compiler/clang.rs @@ -229,6 +229,7 @@ counted_array!(pub static ARGS: [ArgInfo; _] = [ take_arg!("-gcc-toolchain", OsString, Separated, PassThrough), flag!("-gcodeview", PassThroughFlag), take_arg!("-include-pch", PathBuf, CanBeSeparated, PreprocessorArgumentPath), + take_arg!("-ivfsoverlay", PathBuf, CanBeSeparated, PreprocessorArgumentPath), take_arg!("-load", PathBuf, Separated, ExtraHashFile), flag!("-mconstructor-aliases", PassThroughFlag), take_arg!("-mllvm", OsString, Separated, PassThrough), @@ -655,6 +656,25 @@ mod test { parses!("-c", "foo.c", "-o", "foo.o", "-Xclang", "-gcodeview"); } + #[test] + fn test_ivfsoverlay() { + let a = parses!( + "-c", + "foo.c", + "-o", + "foo.o", + "-Xclang", + "-ivfsoverlay", + "-Xclang", + "/some/overlay.yaml" + ); + assert!(a.common_args.is_empty()); + assert_eq!( + ovec!["-Xclang", "-ivfsoverlay", "-Xclang", "/some/overlay.yaml"], + a.preprocessor_args + ); + } + #[test] fn test_emit_pch() { let a = parses!(