Bug 1194834: Don't use static libs on Windows ASan builds. r=glandium

This commit is contained in:
David Major 2015-09-10 16:55:15 -04:00
parent edb0027da6
commit 2e0f44f809
3 changed files with 17 additions and 3 deletions

View File

@ -25,7 +25,7 @@ def GeckoBinary(linkage='dependent', msvcrt='dynamic', mozglue=None):
'program' (mozglue linked to an executable program), or 'library' (mozglue
linked to a shared library).
'''
if msvcrt == 'dynamic' or CONFIG['OS_ARCH'] != 'WINNT':
if msvcrt == 'dynamic' or CONFIG['OS_ARCH'] != 'WINNT' or CONFIG['MOZ_ASAN']:
xpcomglue = 'xpcomglue'
elif msvcrt == 'static':
USE_STATIC_LIBS = True

View File

@ -381,6 +381,12 @@ ifeq ($(OS_ARCH)_$(GNU_CC),WINNT_)
#// DLL version of the RTL is used...
#//
#//------------------------------------------------------------------------
ifdef MOZ_ASAN
# ASAN-instrumented code tries to link against the dynamic CRT, which can't be
# used in the same link as the static CRT.
USE_STATIC_LIBS=
endif # MOZ_ASAN
ifdef USE_STATIC_LIBS
RTL_FLAGS=-MT # Statically linked multithreaded RTL
ifdef MOZ_DEBUG

View File

@ -17,7 +17,7 @@ else:
kwargs = {
'linkage': None,
}
if CONFIG['MOZ_SANDBOX'] and CONFIG['OS_ARCH'] == 'WINNT':
if CONFIG['MOZ_SANDBOX'] and CONFIG['OS_ARCH'] == 'WINNT' and not CONFIG['MOZ_ASAN']:
kwargs['msvcrt'] = 'static'
if not CONFIG['GNU_CC']:
USE_LIBS += [
@ -55,9 +55,17 @@ if CONFIG['MOZ_SANDBOX'] and CONFIG['OS_ARCH'] == 'WINNT':
]
USE_LIBS += [
'rlz',
'sandbox_staticruntime_s',
]
if CONFIG['MOZ_ASAN']:
USE_LIBS += [
'sandbox_s',
]
else:
USE_LIBS += [
'sandbox_staticruntime_s',
]
# clang-cl can't deal with this delay-load due to bug 1188045
# (also filed as https://llvm.org/bugs/show_bug.cgi?id=24291)
if not CONFIG['CLANG_CL']: