Skip to content

Commit b44c4d2

Browse files
chore: ignore common compilation warnings for instrument-hooks
Transpiled code generates these.
1 parent 4e444de commit b44c4d2

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

setup.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,18 @@
3636
"src/pytest_codspeed/instruments/hooks/instrument-hooks/dist/core.c",
3737
],
3838
include_dirs=["src/pytest_codspeed/instruments/hooks/instrument-hooks/includes"],
39+
# IMPORTANT: Keep in sync with instrument-hooks/.github/workflows/ci.yml
40+
# (COMMON_CFLAGS). The Zig-generated core.c emits many warnings that
41+
# upstream silences; in particular distros like Nix/Debian/Fedora inject
42+
# -Werror=format-security, which would otherwise fail the build.
43+
extra_compile_args=[
44+
"-Wno-format",
45+
"-Wno-format-security",
46+
"-Wno-unused-but-set-variable",
47+
"-Wno-unused-const-variable",
48+
"-Wno-type-limits",
49+
"-Wno-uninitialized",
50+
],
3951
optional=not IS_EXTENSION_REQUIRED,
4052
)
4153

0 commit comments

Comments
 (0)