-
Notifications
You must be signed in to change notification settings - Fork 8
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
Added copts_
list + move -std=c++17
in BUILD
#94
Conversation
All our other compiler flags seem to live in |
88ba132
to
1ce3954
Compare
No. Having these flags "inside" bazel allow us to do conditional flags depending on platform and compiler. The flags in questions are common, but I think this rightfully belongs where Arthur put it. |
1ce3954
to
c305b77
Compare
On my way to finish another PR to add
|
OK, agreed! |
I am just moving an email thread to github here so, bare with the crudeness:
I think we should make a distinction between "nice to have" flags and "need to have" flags - even if the distinction will not be clear cut. Need to have flags are flags needed to be able to compile the package with a given os/compiler setup, independently of whether the package is checked out locally or if it is being imported/compiled as an external dependency. Nice to have flags are flags that helps us primarily or that are useful when compiling, testing, debugging in a locally checked out repo. I think all the need-to-have flags should live in BAZEL.build, in an appropriate place, be it a To return to the question. The I hope this answers your questions and if anything is unclear, just let me know! |
c305b77
to
57faa6c
Compare
copts_
listcopts_
list + move -std=c++17
in BUILD
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.
LGTM. Thanks for getting stuff in there Arthur!
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.
Let's actually define these in a separate .bzl file, how about bazel/copts.bzl
. Then we can load them in BUILD.bazel
and test/BUILD.bazel
so that we don't have to copy them between both places.
57faa6c
to
358acda
Compare
358acda
to
c167dae
Compare
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.
Please address minor comment otherwise LGTM!
`copts_` list contains `-Werror` option in order to turn all warnings into the errors. `-Wno-error=deprecated-declarations` option turns `syscall` warning into a warning even if -Werror is specified.
d32669e
to
7a2fb1b
Compare
copts_
list contains-Werror
option in order to turn all warnings into theerrors.
-Wno-error=deprecated-declarations
option turnssyscall
warninginto a warning even if -Werror is specified.
Also I created an issue in the google/glog repo about
syscall
warning#717.