Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(90)

Unified Diff: build/common.gypi

Issue 137823014: Start landing build support for Clang-style ASan on Windows (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | tools/clang/scripts/update.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/common.gypi
diff --git a/build/common.gypi b/build/common.gypi
index 594b9a21e6aeef80ccc4be111195fa9d5409f0d8..4d68880fd380c91f0871d8cb2aa48ccfd98bad03 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -1607,6 +1607,9 @@
# Turn on multiple dll by default on Windows when in static_library.
'chrome_multiple_dll%': 1,
}],
+ ['asan==1', {
+ 'win_use_allocator_shim%': 0,
+ }],
['component=="shared_library" and "<(GENERATOR)"=="ninja"', {
# Only enabled by default for ninja because it's buggy in VS.
# Not enabled for component=static_library because some targets
@@ -1817,12 +1820,7 @@
],
}],
- ['asan==1 and OS=="win"', {
- # TODO(hans): Remove once users set syzyasan (crbug.com/343960).
- 'syzyasan%': 1,
- }],
- ['asan==1 and OS!="win"', {
- # TODO(hans): Windows should use Clang-based ASan (crbug.com/343960).
+ ['asan==1', {
'clang%': 1,
}],
['asan==1 and OS=="mac"', {
@@ -1979,7 +1977,7 @@
],
}],
- ['OS=="win" and clang==1', {
+ ['OS=="win" and (clang==1 or asan==1)', {
'chromium_win_pch': 0,
}],
@@ -4821,6 +4819,37 @@
}],
],
}],
+ ['asan==1', {
+ # ASan on Windows is a work in progress and very experimental.
+ # See crbug.com/345874.
+ 'VCCLCompilerTool': {
+ 'AdditionalOptions': [
+ '-fsanitize=address',
+ ],
+ },
+ 'VCLinkerTool': {
+ 'AdditionalLibraryDirectories': [
+ # TODO(hans): If make_clang_dir is absolute, this breaks.
+ '<(DEPTH)/<(make_clang_dir)/lib/clang/3.5/lib/windows',
+ ],
+ },
+ 'target_conditions': [
+ ['_type=="executable"', {
+ 'VCLinkerTool': {
+ 'AdditionalDependencies': [
+ 'clang_rt.asan-i386.lib',
+ ],
+ },
+ }],
+ ['_type=="shared_library" or _type=="loadable_module"', {
+ 'VCLinkerTool': {
+ 'AdditionalDependencies': [
+ 'clang_rt.asan_dll_thunk-i386.lib',
+ ],
+ },
+ }],
+ ],
+ }],
],
},
},
« no previous file with comments | « no previous file | tools/clang/scripts/update.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698