Skip to content
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

Disable -Werror on unused-command-line-argument #9030

Merged
merged 1 commit into from
Nov 22, 2022

Conversation

DonggeLiu
Copy link
Contributor

Some projects use -Werror to turn all warnings into errors.
This affects Centipede as we do not separate build and linking flags as it expects, which leads to unused-command-line-argument warnings.
This PR disables turning that specific warning into errors and keeps the rest the same.

@DonggeLiu
Copy link
Contributor Author

DonggeLiu commented Nov 22, 2022

@oliverchang: I reckon this solution is cleaner than what we discussed.

  1. It does not need a wrapper cc.
  2. It only ignores that specific kind of warnings/errors and keeps the rest the same.

Would you think this could be a good solution? Thanks!

@DonggeLiu
Copy link
Contributor Author

/gcbrun trial_build.py all --sanitizer address --fuzzing-engine centipede

@oliverchang
Copy link
Collaborator

nice solution! is this heavily dependent on the order of flags though? i.e. is there a dependency on the -Werror coming before/after what we specify here?

@DonggeLiu
Copy link
Contributor Author

DonggeLiu commented Nov 22, 2022

nice solution! is this heavily dependent on the order of flags though? i.e. is there a dependency on the -Werror coming before/after what we specify here?

Nope, I tested it locally: it can come either before or after -Werror.

@oliverchang
Copy link
Collaborator

nice solution! is this heavily dependent on the order of flags though? i.e. is there a dependency on the -Werror coming before/after what we specify here?

Nope, I tested it locally: it can come either before or after -Werror.

This is great then :) Nice suggestion!

@DonggeLiu DonggeLiu changed the title Disable Werror on unused-command-line-argument Disable -Werror on unused-command-line-argument Nov 22, 2022
@DonggeLiu
Copy link
Contributor Author

/gcbrun trial_build.py all --sanitizer none --fuzzing-engine centipede

@DonggeLiu
Copy link
Contributor Author

/gcbrun trial_build.py all --sanitizer address --fuzzing-engine centipede

This failed only on project wuffs due to running out space:

OSError: [Errno 28] No space left on device

I tested Centipede on wuffs locally and it passed the build test.
The test creases an 8G build/, consisting of a 5.5G out/ and a 2.6G work/, we probably should consider limiting its size.
As a comparison, the build/ dir created by github-scarecrow was 7.7M.

@DonggeLiu DonggeLiu merged commit 6a4ecab into master Nov 22, 2022
@DonggeLiu DonggeLiu deleted the no_unused_arg_error branch November 22, 2022 10:29
DonggeLiu added a commit to google/fuzzbench that referenced this pull request Nov 23, 2022
Some projects use `-Werror` to turn all warnings into errors.
This affects `Centipede` as we do not separate build and linking flags
as it expects, which leads to `unused-command-line-argument` warnings.
This PR disables turning that specific warning into errors and keeps the
rest the same.

See [the same PR from
OSS-Fuzz](google/oss-fuzz#9030) for more info
and [the error in this PR](google/oss-fuzz#8990)
for its use case.
@DonggeLiu DonggeLiu mentioned this pull request Jan 17, 2023
2 tasks
eamonnmcmanus pushed a commit to eamonnmcmanus/oss-fuzz that referenced this pull request Mar 15, 2023
Some projects use `-Werror` to turn all warnings into errors.
This affects `Centipede` as we do not separate build and linking flags
as it expects, which leads to `unused-command-line-argument` warnings.
This PR disables turning that specific warning into errors and keeps the
rest the same.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants