aboutsummaryrefslogtreecommitdiff
path: root/projects/tensorflow
diff options
context:
space:
mode:
authorGabriel Rasskin <grasskin@google.com>2020-07-13 13:41:19 -0700
committerGitHub <noreply@github.com>2020-07-13 13:41:19 -0700
commit7b9a3a895c6aff4b372b9f5700f0f5e875891983 (patch)
tree72e29841043f5747edd950406d77e53adee86d00 /projects/tensorflow
parent820e252dfa84a6f899ad0ecdfb129729a0fac097 (diff)
downloadoss-fuzz-7b9a3a895c6aff4b372b9f5700f0f5e875891983.tar.gz
[tensorflow] Add assert compilation flag (#4119)
Diffstat (limited to 'projects/tensorflow')
-rwxr-xr-xprojects/tensorflow/build.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/projects/tensorflow/build.sh b/projects/tensorflow/build.sh
index 641ce9c08..0412009e3 100755
--- a/projects/tensorflow/build.sh
+++ b/projects/tensorflow/build.sh
@@ -56,6 +56,7 @@ declare -r FUZZERS=$(bazel query 'tests(//tensorflow/security/fuzzing/...)' | gr
# Pass in `$LIB_FUZZING_ENGINE` to `--copt` and `--linkopt` to ensure we have a
# `main` symbol defined (all these fuzzers build without a `main` and by default
# `$CFLAGS` and `CXXFLAGS` compile with `-fsanitize=fuzzer-no-link`).
+# Since we have `assert` in fuzzers, make sure `NDEBUG` is not defined
bazel build \
--config=libc++ \
${EXTRA_FLAGS} \
@@ -63,6 +64,7 @@ bazel build \
--strip=never \
--copt=${LIB_FUZZING_ENGINE} \
--linkopt=${LIB_FUZZING_ENGINE} \
+ --copt='-UNDEBUG' \
-- ${FUZZERS}
# The fuzzers built above are in the `bazel-bin/` symlink. But they need to be