Skip to content

Commit

Permalink
Fix errorprone javac path for GN.
Browse files Browse the repository at this point in the history
BUG=598708

Review URL: https://codereview.chromium.org/1848593002

Cr-Commit-Position: refs/heads/master@{#384423}
  • Loading branch information
case540 authored and Commit bot committed Mar 31, 2016
1 parent 02869b2 commit 0004417
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 12 deletions.
19 changes: 8 additions & 11 deletions build/config/android/internal_rules.gni
Original file line number Diff line number Diff line change
Expand Up @@ -240,9 +240,10 @@ template("java_binary_script") {
args += [ "--" ] + invoker.wrapper_script_args
}
if (defined(invoker.bootclasspath)) {
inputs += [ invoker.bootclasspath ]
args += [
"--bootclasspath",
invoker.bootclasspath,
rebase_path(invoker.bootclasspath, root_build_dir),
]
}
}
Expand Down Expand Up @@ -1327,9 +1328,11 @@ template("java_prebuilt_impl") {
if (defined(invoker.main_class)) {
_binary_script_target_name = "${_template_name}__java_binary_script"
java_binary_script(_binary_script_target_name) {
deps = []
forward_variables_from(invoker,
[
"bootclasspath",
"deps",
"main_class",
"wrapper_script_args",
])
Expand All @@ -1339,29 +1342,23 @@ template("java_prebuilt_impl") {
if (defined(invoker.wrapper_script_name)) {
script_name = invoker.wrapper_script_name
}
deps = [
":$_build_config_target_name",
]
deps += [ ":$_build_config_target_name" ]
}
}

group(target_name) {
forward_variables_from(invoker, [ "data_deps" ])
deps = [
public_deps = [
":$_ijar_target_name",
":$_process_jar_target_name",
]
if (_supports_android) {
deps += [ ":$_dex_target_name" ]
}
data_deps = []
if (defined(invoker.data_deps)) {
data_deps += invoker.data_deps
public_deps += [ ":$_dex_target_name" ]
}
if (defined(invoker.main_class)) {
# Some targets use the generated script while building, so make it a dep
# rather than a data_dep.
deps += [ ":$_binary_script_target_name" ]
public_deps += [ ":$_binary_script_target_name" ]
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion third_party/errorprone/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,6 @@ java_prebuilt("chromium_errorprone") {
main_class = "com.google.errorprone.ErrorProneCompiler"

# TODO(mikecase): Remove this extra arg when the bots are on jdk8 or higher.
bootclasspath = "$target_gen_dir/javac_java.jar"
bootclasspath =
"$root_build_dir/lib.java/third_party/errorprone/javac_java.jar"
}

0 comments on commit 0004417

Please sign in to comment.