Silence -Wcomment warnings in cxx compiler runs

This is one of the few warnings we disable due to false positives.  Let's also
disable it in the preprocessing steps needed for the Rust build.

Other warnings we ignore are -Wno-address -Wunused-local-typedefs and
-Wunused-macros. I didn't add them here because I don't expect that they
will be triggered by the headers we give to cxx.
This commit is contained in:
Johannes Altmanninger 2023-03-03 20:43:59 +01:00
parent 0410bacdf6
commit d0bda9893b

View file

@ -41,6 +41,7 @@ fn main() -> miette::Result<()> {
.include(&fish_src_dir)
.include(&fish_build_dir) // For config.h
.include(&cxx_include_dir) // For cxx.h
.flag("-Wno-comment")
.compile("fish-rust");
// Emit autocxx junk.
@ -50,6 +51,7 @@ fn main() -> miette::Result<()> {
.custom_gendir(autocxx_gen_dir.into())
.build()?;
b.flag_if_supported("-std=c++11")
.flag("-Wno-comment")
.compile("fish-rust-autocxx");
for file in source_files {
println!("cargo:rerun-if-changed={file}");