Skip to content

Commit fca8410

Browse files
froydnjchmanchester
authored andcommitted
fix rewrite_includes_only = false clang failure
The option is called `-x cpp-output` not `-x c-cpp-output`. Fixes #651.
1 parent 3580409 commit fca8410

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/compiler/gcc.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,10 @@ pub fn generate_compile_commands(
560560
}
561561
.into();
562562
if !rewrite_includes_only {
563-
language.push_str("-cpp-output");
563+
match parsed_args.language {
564+
Language::C => language = "cpp-output".into(),
565+
_ => language.push_str("-cpp-output"),
566+
}
564567
}
565568
let mut arguments: Vec<String> = vec![
566569
"-x".into(),

0 commit comments

Comments
 (0)