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

Unified Diff: build/common.gypi

Issue 1082503002: Use the Clang plugin on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: It turns out extra nesting does fix gyp problems Created 5 years, 8 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 | build/config/clang/BUILD.gn » ('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 043d4906ddcbeb8b5478da5766083298c3307cdc..08ef5556f7e5e4c7e3bb0e3ebd873edc02a7ccd9 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -2148,20 +2148,31 @@
'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"', {
+ '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',
+ }],
+ ],
+ },
+ 'clang_dynlib_flags%': '-Xclang -load -Xclang <(clang_lib_path) ',
+ }, { # OS == "win"
+ # On Windows, the plugin is built directly into clang, so there's
+ # no need to load it dynamically.
+ 'clang_dynlib_flags%': '',
+ }]
],
},
# 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,
@@ -2214,9 +2225,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
@@ -5613,6 +5624,13 @@
],
},
}],
+ ['clang==1 and clang_use_chrome_plugins==1', {
+ 'VCCLCompilerTool': {
+ 'AdditionalOptions': [
+ '<@(clang_chrome_plugins_flags)',
+ ],
+ },
+ }],
],
},
},
« no previous file with comments | « no previous file | build/config/clang/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698