aboutsummaryrefslogtreecommitdiff
path: root/.bazel/compiler_flags.bazelrc
diff options
context:
space:
mode:
authoraqua <aqua@iserlohn-fortress.net>2024-03-08 17:24:49 +0200
committeraqua <aqua@iserlohn-fortress.net>2024-03-08 22:00:07 +0200
commit20b97ea7c0dbbdc13800e12ff5c86c00c4a342ec (patch)
tree473281e5fc8b256827ce1a678573444e1aa5f669 /.bazel/compiler_flags.bazelrc
parentGenerate src/conf.h (diff)
downloadkernel-20b97ea7c0dbbdc13800e12ff5c86c00c4a342ec.tar.xz
Bazel build
Diffstat (limited to '.bazel/compiler_flags.bazelrc')
-rw-r--r--.bazel/compiler_flags.bazelrc27
1 files changed, 27 insertions, 0 deletions
diff --git a/.bazel/compiler_flags.bazelrc b/.bazel/compiler_flags.bazelrc
new file mode 100644
index 0000000..59a87f3
--- /dev/null
+++ b/.bazel/compiler_flags.bazelrc
@@ -0,0 +1,27 @@
+build --copt=-Wall
+build --copt=-Wextra
+build --copt=-Wpedantic
+build --copt=-Werror=shadow
+build --copt=-Wunused-parameter
+build --copt=-Wmisleading-indentation
+build --copt=-Wundef
+build --copt=-Wuninitialized
+
+# cast warnings
+build --copt=-Wcast-align
+build --copt=-Wcast-qual
+
+# conversion
+build --copt=-Wconversion
+build --copt=-Wsign-conversion
+build --copt=-Wdouble-promotion
+
+# pointers
+build --copt=-Wpointer-arith
+build --copt=-Wnull-dereference
+
+# cpp flags
+build --cxxopt=-Wnon-virtual-dtor
+build --cxxopt=-Woverloaded-virtual
+build --cxxopt=-Wold-style-cast
+