Skip to content

Commit 97933b1

Browse files
committed
fixup: sync flags with instrument-hooks
1 parent b44e0c0 commit 97933b1

1 file changed

Lines changed: 13 additions & 5 deletions

File tree

crates/codspeed/build.rs

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,23 @@ fn main() {
77

88
let mut build = cc::Build::new();
99
build
10+
.flag("-std=c11")
1011
.file("instrument-hooks/dist/core.c")
1112
.include("instrument-hooks/includes")
12-
.flag("-std=c11")
1313
// We generated the C code from Zig, which contains some warnings
1414
// that can be safely ignored.
15-
.flag_if_supported("-Wno-builtin-declaration-mismatch")
16-
.flag_if_supported("-Wno-incompatible-library-redeclaration")
17-
// Not supported in clang: https://stackoverflow.com/a/41673702
18-
.flag_if_supported("-Wno-maybe-uninitialized")
15+
.flag("-Wno-format")
16+
.flag("-Wno-format-security")
17+
.flag("-Wno-unused-but-set-variable")
18+
.flag("-Wno-unused-const-variable")
19+
.flag("-Wno-type-limits")
20+
.flag("-Wno-uninitialized")
21+
// Ignore warnings when cross-compiling:
22+
.flag("-Wno-overflow")
23+
.flag("-Wno-unused-function")
24+
.flag("-Wno-constant-conversion")
25+
.flag("-Wno-incompatible-pointer-types")
26+
// Disable warnings, as we will have lots of them
1927
.warnings(false)
2028
.extra_warnings(false)
2129
.opt_level(3);

0 commit comments

Comments
 (0)