Enable most warnings, and make them errors.
This adds `-Wall` and `-Werror` to the C and C++ compiler flags. It also adds `-Wno-attributes` to disable warnings about unrecognized attributes. This is needed because the `swift_name` test relies on `__attribute__((swift_name(some_name)))` attribute.
This commit is contained in:
parent
fb348d91e8
commit
70188bb3b2
@ -72,6 +72,10 @@ fn compile(cbindgen_output: &Path, language: Language) {
|
||||
command.arg("-D").arg("DEFINED");
|
||||
command.arg("-c").arg(cbindgen_output);
|
||||
command.arg("-o").arg(&object);
|
||||
command.arg("-Wall");
|
||||
command.arg("-Werror");
|
||||
// `swift_name` is not recognzied by gcc.
|
||||
command.arg("-Wno-attributes");
|
||||
if let Language::Cxx = language {
|
||||
// enum class is a c++11 extension which makes g++ on macos 10.14 error out
|
||||
// inline variables are are a c++17 extension
|
||||
|
Loading…
x
Reference in New Issue
Block a user