Bug 1083887 - Package the clang-cl runtime library for ASAN on Windows ASAN builds; r=gps

This commit is contained in:
Ehsan Akhgari 2014-10-16 21:40:00 -04:00
parent da1ac44cbc
commit fa53abc047
4 changed files with 23 additions and 0 deletions

View File

@ -137,6 +137,9 @@ DEFINES += -DMOZ_ICU_DBG_SUFFIX=$(MOZ_ICU_DBG_SUFFIX)
ifdef CLANG_CXX
DEFINES += -DCLANG_CXX
endif
ifdef CLANG_CL
DEFINES += -DCLANG_CL
endif
libs::
$(MAKE) -C $(DEPTH)/browser/locales langpack

View File

@ -921,4 +921,7 @@ bin/libfreebl_32int64_3.so
#ifdef CLANG_CXX
@BINPATH@/llvm-symbolizer
#endif
#ifdef CLANG_CL
@BINPATH@/clang_rt.asan_dynamic-i386.dll
#endif
#endif

View File

@ -66,6 +66,13 @@ LLDBINIT_FINAL_TARGET_FILES := $(DEPTH)/.lldbinit
LLDBINIT_FINAL_TARGET_DEST = $(FINAL_TARGET)
INSTALL_TARGETS += LLDBINIT_FINAL_TARGET
ifeq (1_1,$(MOZ_ASAN)_$(CLANG_CL))
# Install the clang-cl runtime library for ASAN next to the binaries we produce.
CLANG_RT_ASAN_FILES := $(MOZ_CLANG_RT_ASAN_LIB_PATH)
CLANG_RT_ASAN_DEST = $(FINAL_TARGET)
INSTALL_TARGETS += CLANG_RT_ASAN
endif
include $(topsrcdir)/config/rules.mk
TARGET_DEPTH = ..

View File

@ -1260,6 +1260,16 @@ MOZ_ARG_ENABLE_BOOL(address-sanitizer,
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
# 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
AC_DEFINE(MOZ_ASAN)
MOZ_PATH_PROG(LLVM_SYMBOLIZER, llvm-symbolizer)
fi