Chromium Code Reviews| Index: build/common.gypi |
| diff --git a/build/common.gypi b/build/common.gypi |
| index e80d60554187f288596291757ee883b98c0676b8..a7ac6ce3465938b4407d6769485045fe5dafc26d 100644 |
| --- a/build/common.gypi |
| +++ b/build/common.gypi |
| @@ -2174,20 +2174,27 @@ |
| 'grit_defines': ['-D', 'enable_service_discovery'], |
| 'enable_service_discovery%': 1 |
| }], |
| - ['clang_use_chrome_plugins==1 and OS!="win"', { |
| + ['clang_use_chrome_plugins==1', { |
| 'variables': { |
| 'conditions': [ |
| - ['OS=="mac" or OS=="ios"', { |
| - 'clang_lib_path%': '<!(cd <(DEPTH) && pwd -P)/third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.dylib', |
| - }, { # OS != "mac" or OS != "ios" |
| - 'clang_lib_path%': '<!(cd <(DEPTH) && pwd -P)/third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so', |
| - }], |
| + ['OS!="win"', { |
| + 'conditions': [ |
| + ['OS=="mac" or OS=="ios"', { |
| + 'clang_lib_path%': '<!(cd <(DEPTH) && pwd -P)/third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.dylib', |
| + }, { # OS != "mac" or OS != "ios" |
| + 'clang_lib_path%': '<!(cd <(DEPTH) && pwd -P)/third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so', |
| + }], |
| + ], |
| + 'clang_dynlib_flags%': '-Xclang -load -Xclang <(clang_lib_path) ', |
| + }, { # OS == "win" |
| + 'clang_dynlib_flags%': '', |
|
hans
2015/04/11 12:00:30
Probably worth a comment that the plugins are link
dcheng
2015/04/11 19:27:24
Yeah, that's a good idea. Done.
|
| + }] |
| ], |
| }, |
| # If you change these, also change build/config/clang/BUILD.gn. |
| 'clang_chrome_plugins_flags%': |
| - '-Xclang -load -Xclang <(clang_lib_path)' |
| - ' -Xclang -add-plugin -Xclang find-bad-constructs', |
| + '<(clang_dynlib_flags)' |
| + '-Xclang -add-plugin -Xclang find-bad-constructs', |
| }], |
| ['asan==1 or msan==1 or lsan==1 or tsan==1', { |
| 'clang%': 1, |
| @@ -2240,9 +2247,9 @@ |
| }], |
| ['OS=="win"', { |
| - # The Clang plugins don't currently work on Windows. |
| + # The Blink GC plugin doesn't currently work on Windows. |
| # TODO(hans): One day, this will work. (crbug.com/82385) |
| - 'clang_use_chrome_plugins%': 0, |
| + 'blink_gc_plugin%': 0, |
| }], |
| # On valgrind bots, override the optimizer settings so we don't inline too |
| @@ -5632,6 +5639,13 @@ |
| ], |
| }, |
| }], |
| + ['clang==1 and clang_use_chrome_plugins==1', { |
| + 'VCCLCompilerTool': { |
| + 'AdditionalOptions': [ |
| + '<@(clang_chrome_plugins_flags)', |
| + ], |
| + }, |
| + }], |
| ], |
| }, |
| }, |