-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
`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.
- Loading branch information
1 parent
79acd4f
commit 668f6fc
Showing
4 changed files
with
36 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
"""Get compiler options for the specific OS.""" | ||
|
||
# Common compiler options for macOS, Linux and Windows. | ||
copts_common = [ | ||
"-Werror", | ||
] | ||
|
||
# Get the final list of options composed with common options for the specific | ||
# OS. | ||
def copts(): | ||
return copts_common + select({ | ||
"@bazel_tools//src/conditions:windows": [ | ||
"\"/std:c++17\"", | ||
"-Wno-error=microsoft-cast", | ||
"-Wno-error=invalid-noreturn", | ||
"-Wno-error=microsoft-include", | ||
], | ||
"@bazel_tools//src/conditions:darwin": [ | ||
"-std=c++17", | ||
# We do not want to treat `syscall` warning as an error. | ||
# Future update of glog lib will fix this warning. | ||
"-Wno-error=deprecated-declarations", | ||
], | ||
"//conditions:default": [ | ||
"-std=c++17", | ||
], | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters