Commit a798c2f1 authored by Tom Hughes's avatar Tom Hughes Committed by Copybara-Service
Browse files

Add -Wundef to the CI scripts when building with Bazel

The CMake build already adds -Wundef for gcc/clang. This change makes sure that
the gcc/clang Bazel builds also compile correctly with -Wundef (#3267).

PiperOrigin-RevId: 514864451
Change-Id: I7798a4a4c68d037e23625db24ee29df454367734
parent 678c1c73
...@@ -78,6 +78,7 @@ time docker run \ ...@@ -78,6 +78,7 @@ time docker run \
--copt="-Wall" \ --copt="-Wall" \
--copt="-Werror" \ --copt="-Werror" \
--copt="-Wuninitialized" \ --copt="-Wuninitialized" \
--copt="-Wundef" \
--copt="-Wno-error=pragmas" \ --copt="-Wno-error=pragmas" \
--distdir="/bazel-distdir" \ --distdir="/bazel-distdir" \
--features=external_include_paths \ --features=external_include_paths \
...@@ -99,6 +100,7 @@ for std in ${STD}; do ...@@ -99,6 +100,7 @@ for std in ${STD}; do
--copt="-Wall" \ --copt="-Wall" \
--copt="-Werror" \ --copt="-Werror" \
--copt="-Wuninitialized" \ --copt="-Wuninitialized" \
--copt="-Wundef" \
--define="absl=${absl}" \ --define="absl=${absl}" \
--distdir="/bazel-distdir" \ --distdir="/bazel-distdir" \
--features=external_include_paths \ --features=external_include_paths \
...@@ -123,6 +125,7 @@ for std in ${STD}; do ...@@ -123,6 +125,7 @@ for std in ${STD}; do
--copt="-Wall" \ --copt="-Wall" \
--copt="-Werror" \ --copt="-Werror" \
--copt="-Wuninitialized" \ --copt="-Wuninitialized" \
--copt="-Wundef" \
--define="absl=${absl}" \ --define="absl=${absl}" \
--distdir="/bazel-distdir" \ --distdir="/bazel-distdir" \
--features=external_include_paths \ --features=external_include_paths \
......
...@@ -66,6 +66,7 @@ for absl in 0 1; do ...@@ -66,6 +66,7 @@ for absl in 0 1; do
${BAZEL_BIN} test ... \ ${BAZEL_BIN} test ... \
--copt="-Wall" \ --copt="-Wall" \
--copt="-Werror" \ --copt="-Werror" \
--copt="-Wundef" \
--cxxopt="-std=c++14" \ --cxxopt="-std=c++14" \
--define="absl=${absl}" \ --define="absl=${absl}" \
--features=external_include_paths \ --features=external_include_paths \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment