Skip to content

Commit db4c62a

Browse files
Add support for -Xclang -fno-pch-timestamp
Fixes: #1720
1 parent 534f4e9 commit db4c62a

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

src/compiler/clang.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ counted_array!(pub static ARGS: [ArgInfo<gcc::ArgData>; _] = [
178178
take_arg!("-fdebug-compilation-dir", OsString, Separated, PassThrough),
179179
flag!("-fmodules", TooHardFlag),
180180
flag!("-fno-color-diagnostics", NoDiagnosticsColorFlag),
181+
flag!("-fno-pch-timestamp", PassThroughFlag),
181182
flag!("-fno-profile-instr-generate", TooHardFlag),
182183
flag!("-fno-profile-instr-use", TooHardFlag),
183184
take_arg!("-fplugin", PathBuf, CanBeConcatenated('='), ExtraHashFile),
@@ -593,6 +594,19 @@ mod test {
593594
assert_eq!(ovec!["-Xclang", "-no-opaque-pointers"], a.preprocessor_args);
594595
}
595596

597+
#[test]
598+
fn test_parse_xclang_fno_pch_timestamp() {
599+
let a = parses!(
600+
"-c",
601+
"foo.c",
602+
"-o",
603+
"foo.o",
604+
"-Xclang",
605+
"-fno-pch-timestamp"
606+
);
607+
assert_eq!(ovec!["-Xclang", "-fno-pch-timestamp"], a.common_args);
608+
}
609+
596610
#[test]
597611
fn test_parse_xclang_use_ctor_homing() {
598612
let a = parses!("-c", "foo.c", "-o", "foo.o", "-Xclang", "-fuse-ctor-homing");

0 commit comments

Comments
 (0)