summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFranziskus Kiefer <franziskuskiefer@gmail.com>2017-01-20 12:39:05 +0100
committerFranziskus Kiefer <franziskuskiefer@gmail.com>2017-01-20 12:39:05 +0100
commitda542a6265706007560bca0f77714feabc0c230c (patch)
treeeca3c81206ddd460804d5cb9b7f3f41b1178f5d9
parent2e3beea890baf908666263244be5c5d475a780ef (diff)
downloadnss-hg-da542a6265706007560bca0f77714feabc0c230c.tar.gz
Bug 1177759 - default to clang if CC is not set and --fuzz is used, r=ttaubert
Differential Revision: https://nss-review.dev.mozaws.net/D165
-rw-r--r--coreconf/fuzz.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/coreconf/fuzz.sh b/coreconf/fuzz.sh
index bc8a5a0d1..df51617d8 100644
--- a/coreconf/fuzz.sh
+++ b/coreconf/fuzz.sh
@@ -1,6 +1,19 @@
#!/usr/bin/env bash
# This file is used by build.sh to setup fuzzing.
+set +e
+
+# Default to clang if CC is not set.
+command -v clang &> /dev/null 2>&1
+if [[ $? = 0 && -z "$CC" ]]; then
+ export CC=clang
+ export CCC=clang++
+ export CXX=clang++
+else
+ echo "Fuzzing requires clang!"
+ exit 1
+fi
+
gyp_params+=(-Dtest_build=1 -Dfuzz=1)
# Add debug symbols even for opt builds.