Chromium Code Reviews| Index: build/config/android/internal_rules.gni |
| diff --git a/build/config/android/internal_rules.gni b/build/config/android/internal_rules.gni |
| index 661ed253a3ad83bcb163df9d8264cb151896854c..e5760b6177c787496cb9305cddd57741f466ea56 100644 |
| --- a/build/config/android/internal_rules.gni |
| +++ b/build/config/android/internal_rules.gni |
| @@ -1985,9 +1985,25 @@ if (enable_java_templates) { |
| # Don't enable coverage, lint, findbugs unless the target has some |
| # non-generated files. |
| - _chromium_code = defined(invoker.java_files) && invoker.java_files != [] |
| if (defined(invoker.chromium_code)) { |
| _chromium_code = invoker.chromium_code |
| + } else { |
| + _chromium_code = defined(invoker.java_files) && invoker.java_files != [] |
| + if (_chromium_code) { |
| + # Make chromium_code = false be the default for targets within |
| + # third_party which contain no chromium-namespaced java files. |
| + set_sources_assignment_filter([ "*\bthird_party\b*" ]) |
| + sources = [ |
|
Yaron
2016/06/29 15:29:20
Is this a local variable? Prefix with "_" or are y
agrieve
2016/06/29 17:47:42
This is currently the only way to do filtering in
Yaron
2016/06/29 18:16:22
So there's no need to cache and restore it after?
agrieve
2016/06/29 18:46:40
It's restored (back to []) on line 2004. GN also r
Yaron
2016/06/29 18:48:49
Ya, I getcha. I was wondering if sources could be
|
| + get_label_info(":$target_name", "dir"), |
| + ] |
| + if (sources == []) { |
| + set_sources_assignment_filter([ "*\bchromium\b*" ]) |
| + sources = invoker.java_files |
| + _chromium_code = invoker.java_files != sources |
| + } |
| + set_sources_assignment_filter([]) |
| + sources = [] |
| + } |
| } |
| _emma_never_instrument = !_chromium_code |