Add -Werror CI job
We should cause CLs that introduce compiler warnings to fail CI. Sadly
this will only cover Clang, but it will cover Clang for free, so it's
truly impossible to say if it's bad or not.
Change-Id: I45ca20d77251af9671d5cbe0d29cb08c5f1d03c2
This commit is contained in:
parent
e51263057f
commit
b5c6ce7a53
|
@ -283,6 +283,10 @@
|
||||||
"address"
|
"address"
|
||||||
"undefined"
|
"undefined"
|
||||||
];
|
];
|
||||||
|
# it is very hard to make *every* CI build use this option such
|
||||||
|
# that we don't wind up building Lix twice, so we do it here where
|
||||||
|
# we are already doing so.
|
||||||
|
werror = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Make sure that nix-env still produces the exact same result
|
# Make sure that nix-env still produces the exact same result
|
||||||
|
|
|
@ -60,6 +60,8 @@
|
||||||
# List of Meson sanitize options. Accepts values of b_sanitize, e.g.
|
# List of Meson sanitize options. Accepts values of b_sanitize, e.g.
|
||||||
# "address", "undefined", "thread".
|
# "address", "undefined", "thread".
|
||||||
sanitize ? null,
|
sanitize ? null,
|
||||||
|
# Turn compiler warnings into errors.
|
||||||
|
werror ? false,
|
||||||
|
|
||||||
# Not a real argument, just the only way to approximate let-binding some
|
# Not a real argument, just the only way to approximate let-binding some
|
||||||
# stuff for argument defaults.
|
# stuff for argument defaults.
|
||||||
|
@ -191,6 +193,7 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
(lib.mesonEnable "internal-api-docs" internalApiDocs)
|
(lib.mesonEnable "internal-api-docs" internalApiDocs)
|
||||||
(lib.mesonBool "enable-tests" finalAttrs.finalPackage.doCheck)
|
(lib.mesonBool "enable-tests" finalAttrs.finalPackage.doCheck)
|
||||||
(lib.mesonBool "enable-docs" canRunInstalled)
|
(lib.mesonBool "enable-docs" canRunInstalled)
|
||||||
|
(lib.mesonBool "werror" werror)
|
||||||
]
|
]
|
||||||
++ lib.optional (hostPlatform != buildPlatform) "--cross-file=${mesonCrossFile}"
|
++ lib.optional (hostPlatform != buildPlatform) "--cross-file=${mesonCrossFile}"
|
||||||
++ sanitizeOpts;
|
++ sanitizeOpts;
|
||||||
|
|
Loading…
Reference in a new issue