-
Couldn't load subscription status.
- Fork 19
Emstricten libcn #223
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Emstricten libcn #223
Conversation
|
(The branch is based on #220, which should be merged before.) |
| #!/bin/bash | ||
|
|
||
| FLAGS="-O2 " | ||
| if [[ -n "${GITHUB_ACTIONS+isset}" ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Without this, if you have a newer version of a compiler, builds can break locally, but pass CI. See #85.
So I would not remove this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that there is no -Werror, and only hand-picked warning are promoted to errors.
I can re-add -Werror for the CI. But the additional warnings should be local, otherwise they go unfixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Or, we can use dune-idiomatic thing and add it for dev profile only.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removing -Werror weakens CI, no? I'd rather not...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can re-add -Werror for the CI. But the additional warnings should be local, otherwise they go unfixed.
Perhaps we do this then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pqwy Zain seems to be happy with re-adding -Werror for the CI and making additional warnings local, so once you update the branch I'm happy to merge
Increase the C compiler strictness for libcn, to mirror the Linux build environment more closely. Then fix the obvious fallout. In particular:
runtime/libcn/lib/compile.sh;-Werror=strict-prototypestree-wide;-Wimplicit-fallthroughin Fulminate.This helps avoid a few C foot guns, and keeps the C sources in a good shape to build as part of Linux/pKVM. There are no downsides to adhering to a slightly stricter programming discipline, either.
One functional change I made is not making warnings conditional on CI. Having them pop out during development helps fixing things early; and conversely, having the CI stricter than the normal workflow is bound to cause frustration.