summaryrefslogtreecommitdiff
path: root/coreconf/fuzz.sh
diff options
context:
space:
mode:
authorMartin Thomson <martin.thomson@gmail.com>2018-10-12 16:22:34 +1100
committerMartin Thomson <martin.thomson@gmail.com>2018-10-12 16:22:34 +1100
commit395db9dd0d6eb8d7982db4d8f1845f80c4af8c17 (patch)
tree5c50ee7e4a35803835ac4c1fbe384569fafdb842 /coreconf/fuzz.sh
parent90e6c8c4fdde4bc1524d9e821856542aeebcabd0 (diff)
downloadnss-hg-395db9dd0d6eb8d7982db4d8f1845f80c4af8c17.tar.gz
Bug 1434943 - Support for MSVC in build.sh, r=jcj
Summary: This adds basic support for MSVC to build.sh. It uses the registry and vswhere (which is part of the standard mozilla-build setup now) to work out paths and set them properly. It's probably a little fragile, but it's better than the shoestring and tape we have in builds right now. I took the liberty of sanitizing the command-line options a little here. Mostly that is sorting them, but I also deprecated the -m32 option in favour of specifying target architecture with -t. That turned out to be a lot cleaner. Reviewers: jcj Reviewed By: jcj Bug #: 1434943 Differential Revision: https://phabricator.services.mozilla.com/D5125
Diffstat (limited to 'coreconf/fuzz.sh')
-rw-r--r--coreconf/fuzz.sh7
1 files changed, 3 insertions, 4 deletions
diff --git a/coreconf/fuzz.sh b/coreconf/fuzz.sh
index 67cb7f594..c7b8844b6 100644
--- a/coreconf/fuzz.sh
+++ b/coreconf/fuzz.sh
@@ -5,8 +5,7 @@ set +e
# Default to clang if CC is not set.
if [ -z "$CC" ]; then
- command -v clang &> /dev/null 2>&1
- if [ $? != 0 ]; then
+ if ! command -v clang &> /dev/null 2>&1; then
echo "Fuzzing requires clang!"
exit 1
fi
@@ -24,8 +23,8 @@ if [ "$fuzz_oss" = 1 ]; then
gyp_params+=(-Dno_zdefs=1 -Dfuzz_oss=1)
else
enable_sanitizer asan
- # Ubsan doesn't build on 32-bit at the moment. Disable it.
- if [ "$build_64" = 1 ]; then
+ # Ubsan only builds on x64 for the moment.
+ if [ "$target_arch" = "x64" ]; then
enable_ubsan
fi
enable_sancov