Commit cadd4e7f authored by Dan Beam's avatar Dan Beam Committed by Commit Bot

Closure: fall back to system `java` binary if jdk not on platform

R=agrieve@chromium.org

Fixed: 1038963
Change-Id: I0101e1ab7e2fe0159465d134c39971331d8b2340
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1985034
Commit-Queue: Dan Beam <dbeam@chromium.org>
Commit-Queue: Andrew Grieve <agrieve@chromium.org>
Auto-Submit: Dan Beam <dbeam@chromium.org>
Reviewed-by: default avatarAndrew Grieve <agrieve@chromium.org>
Cr-Commit-Position: refs/heads/master@{#728317}
parent 491e7749
...@@ -60,6 +60,9 @@ template("js_library") { ...@@ -60,6 +60,9 @@ template("js_library") {
"testonly", "testonly",
"visibility", "visibility",
]) ])
inputs = [
"$script_path/compiler.py",
]
output_file = "$target_gen_dir/$target_name.js_library" output_file = "$target_gen_dir/$target_name.js_library"
outputs = [ outputs = [
output_file, output_file,
......
...@@ -17,6 +17,9 @@ import processor ...@@ -17,6 +17,9 @@ import processor
_CURRENT_DIR = os.path.join(os.path.dirname(__file__)) _CURRENT_DIR = os.path.join(os.path.dirname(__file__))
_JAVA_BIN = "java"
_JDK_PATH = os.path.join(_CURRENT_DIR, "..", "jdk", "current", "bin", _JAVA_BIN)
_JAVA_PATH = _JDK_PATH if os.path.isfile(_JDK_PATH) else _JAVA_BIN
class Compiler(object): class Compiler(object):
...@@ -24,11 +27,11 @@ class Compiler(object): ...@@ -24,11 +27,11 @@ class Compiler(object):
and produce minified output.""" and produce minified output."""
_JAR_COMMAND = [ _JAR_COMMAND = [
os.path.join(_CURRENT_DIR, "..", "jdk", "current", "bin", "java"), _JAVA_PATH,
"-jar", "-jar",
"-Xms1024m", "-Xms1024m",
"-client", "-client",
"-XX:+TieredCompilation" "-XX:+TieredCompilation",
] ]
_POLYMER_EXTERNS = os.path.join(_CURRENT_DIR, "externs", "polymer-1.0.js") _POLYMER_EXTERNS = os.path.join(_CURRENT_DIR, "externs", "polymer-1.0.js")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment