Bug 1233568: Fix a few issues noticed after this landed. r=wtc.
authorJed Davis <jld@mozilla.com>
Tue, 08 Mar 2016 09:58:54 -0800
changeset 11965 eba25272d2259b50321d5f8254820789d85ae4fd
parent 11964 4188b6f7be73613226789ae3639d075e0baab98c
child 11966 2e605fde0fa9f57275cbc290eb0b2fc49a1c38bb
push id1042
push userwtc@google.com
push dateTue, 08 Mar 2016 17:59:01 +0000
reviewerswtc
bugs1233568
Bug 1233568: Fix a few issues noticed after this landed. r=wtc. Specifically: * Use correct delimiter in ASAN_OPTIONS. * Variable name change (LDFLAGS vs. LFLAGS). * Unbreak Mac ASan build -- shlib linker flags were wrong.
Makefile
coreconf/Darwin.mk
coreconf/sanitizers.mk
tests/common/init.sh
--- a/Makefile
+++ b/Makefile
@@ -87,17 +87,17 @@ NSPR_CONFIGURE_ENV = CC=gcc CXX=g++
 endif
 
 ifdef SANITIZER_CFLAGS
 ifdef BUILD_OPT
 NSPR_CONFIGURE_OPTS += --enable-debug-symbols
 endif
 NSPR_CONFIGURE_ENV += CFLAGS='$(SANITIZER_CFLAGS)' \
                       CXXFLAGS='$(SANITIZER_CFLAGS)' \
-                      LDFLAGS='$(SANITIZER_LFLAGS)'
+                      LDFLAGS='$(SANITIZER_LDFLAGS)'
 endif
 
 #
 # Some pwd commands on Windows (for example, the pwd
 # command in Cygwin) return a pathname that begins
 # with a (forward) slash.  When such a pathname is
 # passed to Windows build tools (for example, cl), it
 # is mistaken as a command-line option.  If that is the case,
--- a/coreconf/Darwin.mk
+++ b/coreconf/Darwin.mk
@@ -133,9 +133,9 @@ ifeq (3,$(SYS_SQLITE3_VERSION_MAJOR))
     ifeq (,$(filter-out 0 1 2 3 4,$(SYS_SQLITE3_VERSION_MINOR)))
         # sqlite <= 3.4.x is too old, it doesn't provide sqlite3_file_control
     else
         NSS_USE_SYSTEM_SQLITE = 1
     endif
 endif
 
 include $(CORE_DEPTH)/coreconf/sanitizers.mk
-DARWIN_SDK_SHLIBFLAGS += $(SANITIZER_FLAGS)
+DARWIN_SDK_SHLIBFLAGS += $(SANITIZER_LDFLAGS)
--- a/coreconf/sanitizers.mk
+++ b/coreconf/sanitizers.mk
@@ -1,17 +1,17 @@
 # Address Sanitizer support; include this in OS-specific .mk files
 # *after* defining the variables that are appended to here.
 
 ifeq ($(USE_ASAN), 1)
 SANITIZER_FLAGS_COMMON = -fsanitize=address $(EXTRA_SANITIZER_FLAGS)
 SANITIZER_CFLAGS = $(SANITIZER_FLAGS_COMMON)
-SANITIZER_LFLAGS = $(SANITIZER_FLAGS_COMMON)
+SANITIZER_LDFLAGS = $(SANITIZER_FLAGS_COMMON)
 OS_CFLAGS += $(SANITIZER_CFLAGS)
-LDFLAGS += $(SANITIZER_LFLAGS)
+LDFLAGS += $(SANITIZER_LDFLAGS)
 
 # ASan needs frame pointers to save stack traces for allocation/free sites.
 # (Warning: some platforms, like ARM Linux in Thumb mode, don't have useful
 # frame pointers even with this option.)
 SANITIZER_CFLAGS += -fno-omit-frame-pointer
 
 # You probably want to be able to get debug info for failures, even with an
 # optimized build.
--- a/tests/common/init.sh
+++ b/tests/common/init.sh
@@ -40,17 +40,17 @@
 #    and a completely common environment
 #
 ########################################################################
 
 NSS_STRICT_SHUTDOWN=1
 export NSS_STRICT_SHUTDOWN
 
 # If using ASan, disable LSan; see bug 1246801.
-ASAN_OPTIONS="detect_leaks=0${ASAN_OPTIONS:+,$ASAN_OPTIONS}"
+ASAN_OPTIONS="detect_leaks=0${ASAN_OPTIONS:+:$ASAN_OPTIONS}"
 export ASAN_OPTIONS
 
 # Init directories based on HOSTDIR variable
 if [ -z "${INIT_SOURCED}" -o "${INIT_SOURCED}" != "TRUE" ]; then
     init_directories()
     {
         TMP=${HOSTDIR}      #TMP=${TMP-/tmp}
         TEMP=${TMP}