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

Unified Diff: build/common.gypi

Issue 6355010: clang: Make it possible to add a plugin through GYP_DEFINES (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comment Created 9 years, 11 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 | no next file » | 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 7f16b21c3f8e127873bde7c597bbd9524c1c3786..6044b5276044f314d6536c7861b052edb6dbdfe1 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -270,6 +270,15 @@
# won't be necessary.
'clang%': 0,
+ # These two variables can be set in GYP_DEFINES while running
+ # |gclient runhooks| to let clang run a plugin in every compilation.
+ # Only has an effect if 'clang=1' is in GYP_DEFINES as well.
+ # Example:
+ # GYP_DEFINES='clang=1 clang_load=/abs/path/to/libPrintFunctionNames.dylib clang_plugin=print-fns' gclient runhooks
+
+ 'clang_load%': '',
+ 'clang_add_plugin%': '',
+
# Override whether we should use Breakpad on Linux. I.e. for Chrome bot.
'linux_breakpad%': 0,
# And if we want to dump symbols for Breakpad-enabled builds.
@@ -1162,6 +1171,12 @@
'-mfpmath=sse',
],
}],
+ ['clang==1 and clang_load!="" and clang_add_plugin!=""', {
+ 'cflags': [
+ '-Xclang', '-load', '-Xclang', '<(clang_load)',
+ '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
+ ],
+ }],
['no_strict_aliasing==1', {
'cflags': [
'-fno-strict-aliasing',
@@ -1274,6 +1289,12 @@
'-Wno-unnamed-type-template-args',
],
}],
+ ['clang==1 and clang_load!="" and clang_add_plugin!=""', {
+ 'OTHER_CFLAGS': [
+ '-Xclang', '-load', '-Xclang', '<(clang_load)',
+ '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
+ ],
+ }],
],
},
'target_conditions': [
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698