Commit b3c1328d authored by Nico Weber's avatar Nico Weber

win: Make asan work with isolates.

1. asan required disable_nacl=1 since there's no 64-bit runtime yet.
   disable_nacl=1 doesn't work with isolates.  Move the asan flags
   around a bit so that they're only applied to 32-bit targets.
   Now everything builds fine without disable_nacl=1

2. One isolate file was missing a <(EXECUTABLE_SUFFIX), add that.

BUG=416078
TEST=
* `ninja -C out\Release chrome_nacl_win64` builds correctly
* out\Release\obj\base\base.ninja still has asan flags,
  the base_unittests.exe link command still has asan flags

R=scottmg@chromium.org

Review URL: https://codereview.chromium.org/871973004

Cr-Commit-Position: refs/heads/master@{#312967}
parent a92494b7
......@@ -34,7 +34,7 @@
'variables': {
'files': [
'../tools/valgrind/asan/',
'../third_party/llvm-build/Release+Asserts/bin/llvm-symbolizer',
'../third_party/llvm-build/Release+Asserts/bin/llvm-symbolizer<(EXECUTABLE_SUFFIX)',
],
},
}],
......
......@@ -5549,52 +5549,6 @@
],
},
}],
['asan==1', {
# ASan on Windows is a work in progress and very experimental.
# See crbug.com/345874.
'VCCLCompilerTool': {
'AdditionalOptions': [
'-fsanitize=address',
],
'AdditionalIncludeDirectories': [
# MSVC needs to be able to find the sanitizer headers when
# invoked via /fallback. This is critical for using macros
# like ASAN_UNPOISON_MEMORY_REGION in files where we fall
# back.
'<(DEPTH)/<(make_clang_dir)/lib/clang/3.7.0/include_sanitizer',
],
},
'VCLinkerTool': {
'AdditionalLibraryDirectories': [
# TODO(hans): If make_clang_dir is absolute, this breaks.
'<(DEPTH)/<(make_clang_dir)/lib/clang/3.7.0/lib/windows',
],
},
'target_conditions': [
['component=="shared_library"', {
'VCLinkerTool': {
'AdditionalDependencies': [
'clang_rt.asan_dynamic-i386.lib',
'clang_rt.asan_dynamic_runtime_thunk-i386.lib',
],
},
}],
['_type=="executable" and component=="static_library"', {
'VCLinkerTool': {
'AdditionalDependencies': [
'clang_rt.asan-i386.lib',
],
},
}],
['(_type=="shared_library" or _type=="loadable_module") and component=="static_library"', {
'VCLinkerTool': {
'AdditionalDependencies': [
'clang_rt.asan_dll_thunk-i386.lib',
],
},
}],
],
}],
],
},
},
......@@ -5629,12 +5583,61 @@
'/ignore:4221',
'/nxcompat',
],
'conditions': [
['syzyasan==0', {
'AdditionalOptions': ['/largeaddressaware'],
}],
],
},
'conditions': [
['syzyasan==0', {
'VCLinkerTool': {
'AdditionalOptions': ['/largeaddressaware'],
},
}],
['asan==1', {
# TODO(asan/win): Move this down into the general
# win-target_defaults section once the 64-bit asan runtime
# exists. See crbug.com/345874.
'VCCLCompilerTool': {
'AdditionalOptions': [
'-fsanitize=address',
],
'AdditionalIncludeDirectories': [
# MSVC needs to be able to find the sanitizer headers when
# invoked via /fallback. This is critical for using macros
# like ASAN_UNPOISON_MEMORY_REGION in files where we fall
# back.
'<(DEPTH)/<(make_clang_dir)/lib/clang/3.7.0/include_sanitizer',
],
},
'VCLinkerTool': {
'AdditionalLibraryDirectories': [
# TODO(hans): If make_clang_dir is absolute, this breaks.
'<(DEPTH)/<(make_clang_dir)/lib/clang/3.7.0/lib/windows',
],
},
'target_conditions': [
['component=="shared_library"', {
'VCLinkerTool': {
'AdditionalDependencies': [
'clang_rt.asan_dynamic-i386.lib',
'clang_rt.asan_dynamic_runtime_thunk-i386.lib',
],
},
}],
['_type=="executable" and component=="static_library"', {
'VCLinkerTool': {
'AdditionalDependencies': [
'clang_rt.asan-i386.lib',
],
},
}],
['(_type=="shared_library" or _type=="loadable_module") and component=="static_library"', {
'VCLinkerTool': {
'AdditionalDependencies': [
'clang_rt.asan_dll_thunk-i386.lib',
],
},
}],
],
}],
],
},
},
'x64_Base': {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment