Skip to content

Commit

Permalink
Bug 1329837 - mac bash doesn't have associative arrays, r=franziskus
Browse files Browse the repository at this point in the history
--HG--
extra : rebase_source : 1228ec22acf57de12cc5d502a4cf2acd9b5b6395
extra : amend_source : 9052f0d89d71c9c0119cd0f24e41fea02e5e57e3
  • Loading branch information
martinthomson committed Jan 30, 2017
1 parent 2415256 commit 114cfd8
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions coreconf/sanitizers.sh
Expand Up @@ -2,14 +2,18 @@
# This file is used by build.sh to setup sanitizers.

sanitizer_flags=""
sanitizers=()

# This tracks what sanitizers are enabled, and their options.
declare -A sanitizers
# This tracks what sanitizers are enabled so they don't get enabled twice. This
# means that doing things that enable the same sanitizer twice (such as enabling
# both --asan and --fuzz) is order-dependent: only the first is used.
enable_sanitizer()
{
local san="$1"
[ -n "${sanitizers[$san]}" ] && return
sanitizers[$san]="${2:-1}"
for i in "${sanitizers[@]}"; do
[ "$san" = "$i" ] && return
done
sanitizers+=("$san")

if [ -z "$sanitizer_flags" ]; then
gyp_params+=(-Dno_zdefs=1)
Expand Down

0 comments on commit 114cfd8

Please sign in to comment.