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

Side by Side Diff: build/config/android/internal_rules.gni

Issue 2103273002: 🎐 Default chromium_code = false for Android targets within third_party (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 unified diff | Download patch
« no previous file with comments | « no previous file | third_party/custom_tabs_client/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//build/config/android/config.gni") 5 import("//build/config/android/config.gni")
6 import("//build/config/sanitizers/sanitizers.gni") 6 import("//build/config/sanitizers/sanitizers.gni")
7 7
8 assert(is_android) 8 assert(is_android)
9 9
10 # Write the target's .build_config file. This is a json file that contains a 10 # Write the target's .build_config file. This is a json file that contains a
(...skipping 1967 matching lines...) Expand 10 before | Expand all | Expand 10 after
1978 1978
1979 if (defined(invoker.run_findbugs_override)) { 1979 if (defined(invoker.run_findbugs_override)) {
1980 _run_findbugs = invoker.run_findbugs_override 1980 _run_findbugs = invoker.run_findbugs_override
1981 } else { 1981 } else {
1982 _run_findbugs = run_findbugs # Default to build arg if not overridden. 1982 _run_findbugs = run_findbugs # Default to build arg if not overridden.
1983 } 1983 }
1984 assert(_run_findbugs || true) # Mark as used. 1984 assert(_run_findbugs || true) # Mark as used.
1985 1985
1986 # Don't enable coverage, lint, findbugs unless the target has some 1986 # Don't enable coverage, lint, findbugs unless the target has some
1987 # non-generated files. 1987 # non-generated files.
1988 _chromium_code = defined(invoker.java_files) && invoker.java_files != []
1989 if (defined(invoker.chromium_code)) { 1988 if (defined(invoker.chromium_code)) {
1990 _chromium_code = invoker.chromium_code 1989 _chromium_code = invoker.chromium_code
1990 } else {
1991 _chromium_code = defined(invoker.java_files) && invoker.java_files != []
1992 if (_chromium_code) {
1993 # Make chromium_code = false be the default for targets within
1994 # third_party which contain no chromium-namespaced java files.
1995 set_sources_assignment_filter([ "*\bthird_party\b*" ])
1996 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
1997 get_label_info(":$target_name", "dir"),
1998 ]
1999 if (sources == []) {
2000 set_sources_assignment_filter([ "*\bchromium\b*" ])
2001 sources = invoker.java_files
2002 _chromium_code = invoker.java_files != sources
2003 }
2004 set_sources_assignment_filter([])
2005 sources = []
2006 }
1991 } 2007 }
1992 2008
1993 _emma_never_instrument = !_chromium_code 2009 _emma_never_instrument = !_chromium_code
1994 if (defined(invoker.emma_never_instrument)) { 2010 if (defined(invoker.emma_never_instrument)) {
1995 _emma_never_instrument = invoker.emma_never_instrument 2011 _emma_never_instrument = invoker.emma_never_instrument
1996 } 2012 }
1997 assert(_emma_never_instrument || true) # Mark as used 2013 assert(_emma_never_instrument || true) # Mark as used
1998 _emma_instrument = emma_coverage && !_emma_never_instrument 2014 _emma_instrument = emma_coverage && !_emma_never_instrument
1999 2015
2000 if (_supports_android) { 2016 if (_supports_android) {
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
2395 outputs = [ 2411 outputs = [
2396 depfile, 2412 depfile,
2397 invoker.out_manifest, 2413 invoker.out_manifest,
2398 ] 2414 ]
2399 inputs = [ 2415 inputs = [
2400 invoker.main_manifest, 2416 invoker.main_manifest,
2401 ] 2417 ]
2402 } 2418 }
2403 } 2419 }
2404 } 2420 }
OLDNEW
« no previous file with comments | « no previous file | third_party/custom_tabs_client/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698