Index: build/common.gypi |
diff --git a/build/common.gypi b/build/common.gypi |
index ddd6546f379437be9af2d050f59f8c5e0091df40..01ef244f8a967f3d64c089ffeb0c21135be87f42 100644 |
--- a/build/common.gypi |
+++ b/build/common.gypi |
@@ -1080,7 +1080,7 @@ |
# Clang stuff. |
'clang%': '<(clang)', |
- 'make_clang_dir%': 'third_party/llvm-build/Release+Asserts', |
+ 'make_clang_dir%': '<!(python -c "import sys, os; print os.path.abspath(sys.argv[1])" <(DEPTH)/third_party/llvm-build/Release+Asserts)', |
Timur Iskhodzhanov
2014/02/13 09:18:30
Maybe want to add a comment explaining why absolut
|
# These two variables can be set in GYP_DEFINES while running |
# |gclient runhooks| to let clang run a plugin in every compilation. |
@@ -1579,6 +1579,9 @@ |
# Turn on multiple dll by default on Windows when in static_library. |
'chrome_multiple_dll%': 1, |
}], |
+ ['clang==1 and 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 |
@@ -2321,8 +2324,8 @@ |
'ENABLE_EGLIMAGE=1', |
], |
}], |
- ['asan==1 and OS=="win"', { |
- # Since asan on windows uses Syzygy, we need /PROFILE turned on to |
+ ['asan==1 and OS=="win" and clang!=1', { |
+ # For SyzyAsan, we need /PROFILE turned on to |
# produce appropriate pdbs. |
'msvs_settings': { |
'VCLinkerTool': { |
@@ -4727,6 +4730,31 @@ |
}], |
], |
}], |
+ ['clang==1 and asan==1', { |
+ # Building with Clang on Windows is a work in progress and very |
+ # experimental. See crbug.com/82385. |
+ 'VCCLCompilerTool': { |
+ 'AdditionalOptions': [ |
+ '-fsanitize=address', |
+ ], |
+ }, |
+ 'target_conditions': [ |
+ ['_type=="executable"', { |
+ 'VCLinkerTool': { |
+ 'AdditionalOptions': [ |
+ '<(make_clang_dir)/lib/clang/3.5/lib/windows/clang_rt.asan-i386.lib', |
+ ], |
+ }, |
+ }], |
+ ['_type=="shared_library" or _type=="loadable_module"', { |
+ 'VCLinkerTool': { |
+ 'AdditionalOptions': [ |
+ '<(make_clang_dir)/lib/clang/3.5/lib/windows/clang_rt.asan_dll_thunk-i386.lib', |
+ ], |
+ }, |
+ }], |
+ ], |
+ }], |
], |
}, |
}, |