Bug 1313394 - Update build system to support 64-bit ASan DLLs. r=ted
authorDavid Major <dmajor@mozilla.com>
Fri, 28 Oct 2016 16:52:36 -0500
changeset 346682 c6587fbc2dbe99f0fabc25454dbe8a02e1eeccf4
parent 346681 5c834894e4b46cf628237789b900996e6525a729
child 346683 72764ba31b81562e3069f6935da33cae06fe6b00
push id10298
push userraliiev@mozilla.com
push dateMon, 14 Nov 2016 12:33:03 +0000
treeherdermozilla-aurora@7e29173b1641 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs1313394
milestone52.0a1
Bug 1313394 - Update build system to support 64-bit ASan DLLs. r=ted
browser/installer/package-manifest.in
build/autoconf/sanitize.m4
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -809,17 +809,17 @@ bin/libfreebl_32int64_3.so
 
 #if defined(CLANG_CXX)
 #if defined(MOZ_ASAN) || defined(MOZ_TSAN)
 @BINPATH@/llvm-symbolizer
 #endif
 #endif
 
 #if defined(MOZ_ASAN) && defined(CLANG_CL)
-@BINPATH@/clang_rt.asan_dynamic-i386.dll
+@BINPATH@/clang_rt.asan_dynamic-*.dll
 #endif
 
 
 ; media
 @RESPATH@/gmp-clearkey/0.1/@DLL_PREFIX@clearkey@DLL_SUFFIX@
 @RESPATH@/gmp-clearkey/0.1/clearkey.info
 
 ; gfx
--- a/build/autoconf/sanitize.m4
+++ b/build/autoconf/sanitize.m4
@@ -9,18 +9,22 @@ dnl = Use Address Sanitizer
 dnl ========================================================
 MOZ_ARG_ENABLE_BOOL(address-sanitizer,
 [  --enable-address-sanitizer       Enable Address Sanitizer (default=no)],
     MOZ_ASAN=1,
     MOZ_ASAN= )
 if test -n "$MOZ_ASAN"; then
     MOZ_LLVM_HACKS=1
     if test -n "$CLANG_CL"; then
-        # Look for clang_rt.asan_dynamic-i386.dll
-        MOZ_CLANG_RT_ASAN_LIB=clang_rt.asan_dynamic-i386.dll
+        # Look for the ASan runtime binary
+        if test "$CPU_ARCH" = "x86_64"; then
+          MOZ_CLANG_RT_ASAN_LIB=clang_rt.asan_dynamic-x86_64.dll
+        else
+          MOZ_CLANG_RT_ASAN_LIB=clang_rt.asan_dynamic-i386.dll
+        fi
         # We use MOZ_PATH_PROG in order to get a Windows style path.
         MOZ_PATH_PROG(MOZ_CLANG_RT_ASAN_LIB_PATH, $MOZ_CLANG_RT_ASAN_LIB)
         if test -z "$MOZ_CLANG_RT_ASAN_LIB_PATH"; then
             AC_MSG_ERROR([Couldn't find $MOZ_CLANG_RT_ASAN_LIB.  It should be available in the same location as clang-cl.])
         fi
         AC_SUBST(MOZ_CLANG_RT_ASAN_LIB_PATH)
     fi
     CFLAGS="-fsanitize=address $CFLAGS"