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

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

Issue 1328793003: GN: Stop setting android.jar in both -classpath and -bootclasspath (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ijar
Patch Set: rebase Created 5 years, 3 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 | no next file » | 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("//third_party/ijar/ijar.gni") 6 import("//third_party/ijar/ijar.gni")
7 7
8 assert(is_android) 8 assert(is_android)
9 9
10 rebased_android_sdk = rebase_path(android_sdk, root_build_dir) 10 rebased_android_sdk = rebase_path(android_sdk, root_build_dir)
(...skipping 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after
1047 } 1047 }
1048 foreach(dep, _srcjar_deps) { 1048 foreach(dep, _srcjar_deps) {
1049 _dep_gen_dir = get_label_info(dep, "target_gen_dir") 1049 _dep_gen_dir = get_label_info(dep, "target_gen_dir")
1050 _dep_name = get_label_info(dep, "name") 1050 _dep_name = get_label_info(dep, "name")
1051 _java_srcjars += [ "$_dep_gen_dir/$_dep_name.srcjar" ] 1051 _java_srcjars += [ "$_dep_gen_dir/$_dep_name.srcjar" ]
1052 } 1052 }
1053 1053
1054 # Mark srcjar_deps as used. 1054 # Mark srcjar_deps as used.
1055 assert(_srcjar_deps == [] || true) 1055 assert(_srcjar_deps == [] || true)
1056 1056
1057 _system_jars = []
1058 if (defined(invoker.android) && invoker.android) {
1059 _system_jars += [ android_sdk_jar ]
1060 }
1061
1062 _rebased_build_config = rebase_path(_build_config, root_build_dir) 1057 _rebased_build_config = rebase_path(_build_config, root_build_dir)
1063 _rebased_jar_path = rebase_path(_intermediate_jar_path, root_build_dir) 1058 _rebased_jar_path = rebase_path(_intermediate_jar_path, root_build_dir)
1064 1059
1065 javac_target_name = "${target_name}__javac" 1060 javac_target_name = "${target_name}__javac"
1066 finish_target_name = "${target_name}__finish" 1061 finish_target_name = "${target_name}__finish"
1067 final_target_name = target_name 1062 final_target_name = target_name
1068 1063
1069 action(javac_target_name) { 1064 action(javac_target_name) {
1070 script = "//build/android/gyp/javac.py" 1065 script = "//build/android/gyp/javac.py"
1071 depfile = "$target_gen_dir/$target_name.d" 1066 depfile = "$target_gen_dir/$target_name.d"
1072 deps = _srcjar_deps 1067 deps = _srcjar_deps
1073 if (defined(invoker.deps)) { 1068 if (defined(invoker.deps)) {
1074 deps += invoker.deps 1069 deps += invoker.deps
1075 } 1070 }
1076 1071
1077 outputs = [ 1072 outputs = [
1078 depfile, 1073 depfile,
1079 _intermediate_jar_path, 1074 _intermediate_jar_path,
1080 _intermediate_jar_path + ".md5.stamp", 1075 _intermediate_jar_path + ".md5.stamp",
1081 ] 1076 ]
1082 sources = _java_files + _java_srcjars 1077 sources = _java_files + _java_srcjars
1083 inputs = _system_jars + [ _build_config ] 1078 inputs = [
1079 _build_config,
1080 ]
1084 1081
1085 _rebased_system_jars = rebase_path(_system_jars, root_build_dir)
1086 _rebased_java_srcjars = rebase_path(_java_srcjars, root_build_dir) 1082 _rebased_java_srcjars = rebase_path(_java_srcjars, root_build_dir)
1087 _rebased_depfile = rebase_path(depfile, root_build_dir) 1083 _rebased_depfile = rebase_path(depfile, root_build_dir)
1088 args = [ 1084 args = [
1089 "--depfile=$_rebased_depfile", 1085 "--depfile=$_rebased_depfile",
1090 "--classpath=$_rebased_system_jars",
1091 "--classpath=@FileArg($_rebased_build_config:javac:classpath)", 1086 "--classpath=@FileArg($_rebased_build_config:javac:classpath)",
1092 "--jar-path=$_rebased_jar_path", 1087 "--jar-path=$_rebased_jar_path",
1093 "--java-srcjars=$_rebased_java_srcjars", 1088 "--java-srcjars=$_rebased_java_srcjars",
1094 "--java-srcjars=@FileArg($_rebased_build_config:javac:srcjars)", 1089 "--java-srcjars=@FileArg($_rebased_build_config:javac:srcjars)",
1095 "--jar-excluded-classes=$_jar_excluded_patterns", 1090 "--jar-excluded-classes=$_jar_excluded_patterns",
1096 ] 1091 ]
1097 if (_supports_android) { 1092 if (_supports_android) {
1098 _rebased_android_sdk_jar = rebase_path(android_sdk_jar, root_build_dir) 1093 _rebased_android_sdk_jar = rebase_path(android_sdk_jar, root_build_dir)
1099 args += [ "--bootclasspath=$_rebased_android_sdk_jar" ] 1094 args += [ "--bootclasspath=$_rebased_android_sdk_jar" ]
1100 } 1095 }
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
1158 _final_deps = [] 1153 _final_deps = []
1159 _final_datadeps = [] 1154 _final_datadeps = []
1160 if (defined(invoker.datadeps)) { 1155 if (defined(invoker.datadeps)) {
1161 _final_datadeps = invoker.datadeps 1156 _final_datadeps = invoker.datadeps
1162 } 1157 }
1163 1158
1164 _supports_android = 1159 _supports_android =
1165 defined(invoker.supports_android) && invoker.supports_android 1160 defined(invoker.supports_android) && invoker.supports_android
1166 _requires_android = 1161 _requires_android =
1167 defined(invoker.requires_android) && invoker.requires_android 1162 defined(invoker.requires_android) && invoker.requires_android
1163 assert(_requires_android || true) # Mark as used.
Dirk Pranke 2015/09/03 20:11:30 if this isn't actually used, why not delete it?
agrieve 2015/09/04 00:05:38 It's still used in the write_build_config step. GN
Dirk Pranke 2015/09/04 00:54:09 Hm. That kinda sounds like a bug in GN. Maybe file
1168 1164
1169 if (_supports_android) { 1165 if (_supports_android) {
1170 _dex_path = _base_path + ".dex.jar" 1166 _dex_path = _base_path + ".dex.jar"
1171 if (defined(invoker.dex_path)) { 1167 if (defined(invoker.dex_path)) {
1172 _dex_path = invoker.dex_path 1168 _dex_path = invoker.dex_path
1173 } 1169 }
1174 } 1170 }
1175 1171
1176 # Define build_config_deps which will be a list of targets required to 1172 # Define build_config_deps which will be a list of targets required to
1177 # build the _build_config. 1173 # build the _build_config.
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
1258 "manifest_entries", 1254 "manifest_entries",
1259 "proguard_config", 1255 "proguard_config",
1260 "proguard_preprocess", 1256 "proguard_preprocess",
1261 ]) 1257 ])
1262 jar_path = _jar_path 1258 jar_path = _jar_path
1263 build_config = _build_config 1259 build_config = _build_config
1264 java_files = _java_files 1260 java_files = _java_files
1265 srcjar_deps = _srcjar_deps 1261 srcjar_deps = _srcjar_deps
1266 srcjars = _srcjars 1262 srcjars = _srcjars
1267 chromium_code = _chromium_code 1263 chromium_code = _chromium_code
1268 android = _requires_android
1269
1270 supports_android = _supports_android 1264 supports_android = _supports_android
1271 deps = build_config_deps 1265 deps = build_config_deps
1272 } 1266 }
1273 1267
1274 if (defined(invoker.main_class)) { 1268 if (defined(invoker.main_class)) {
1275 _final_datadeps += [ ":${_template_name}__java_binary_script" ] 1269 _final_datadeps += [ ":${_template_name}__java_binary_script" ]
1276 java_binary_script("${_template_name}__java_binary_script") { 1270 java_binary_script("${_template_name}__java_binary_script") {
1277 build_config = _build_config 1271 build_config = _build_config
1278 jar_path = _jar_path 1272 jar_path = _jar_path
1279 main_class = invoker.main_class 1273 main_class = invoker.main_class
(...skipping 335 matching lines...) Expand 10 before | Expand all | Expand 10 after
1615 ] 1609 ]
1616 args = [ 1610 args = [
1617 "--depfile", 1611 "--depfile",
1618 rebase_path(depfile, root_build_dir), 1612 rebase_path(depfile, root_build_dir),
1619 "--script-output-path", 1613 "--script-output-path",
1620 rebase_path(generated_script, root_build_dir), 1614 rebase_path(generated_script, root_build_dir),
1621 ] 1615 ]
1622 args += test_runner_args 1616 args += test_runner_args
1623 } 1617 }
1624 } 1618 }
OLDNEW
« 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