diff options
author | 2016-06-22 18:43:13 +0000 | |
---|---|---|
committer | 2016-06-23 11:09:55 +0000 | |
commit | 4068a1d5aeb0493a6d333e691c5cb4f23be6f6dd (patch) | |
tree | 9e033c974b3bdf14a652d619f1e294ce931081be /src/main/java/com/google/devtools/build/lib | |
parent | dc3dad6a905be2ae76d3b1213d7154bf112d1220 (diff) |
Description redacted.
--
MOS_MIGRATED_REVID=125589653
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib')
5 files changed, 37 insertions, 51 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/java/DeployArchiveBuilder.java b/src/main/java/com/google/devtools/build/lib/rules/java/DeployArchiveBuilder.java index 425fb0eac5..3e2b13ae58 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/java/DeployArchiveBuilder.java +++ b/src/main/java/com/google/devtools/build/lib/rules/java/DeployArchiveBuilder.java @@ -27,6 +27,7 @@ import com.google.devtools.build.lib.collect.IterablesChain; import com.google.devtools.build.lib.util.Preconditions; import java.util.HashSet; +import java.util.List; import java.util.Set; import javax.annotation.Nullable; @@ -232,8 +233,7 @@ public class DeployArchiveBuilder { outputJar, javaStartClass, deployManifestLines, buildInfoArtifacts, classpathResources, runtimeClasspath, includeBuildData, compression, launcher); - ImmutableList<String> jvmArgs = - ImmutableList.of("-XX:+TieredCompilation", "-XX:TieredStopAtLevel=1", SINGLEJAR_MAX_MEMORY); + List<String> jvmArgs = ImmutableList.of("-client", SINGLEJAR_MAX_MEMORY); ResourceSet resourceSet = ResourceSet.createWithRamCpuIo(/*memoryMb = */200.0, /*cpuUsage = */.2, /*ioUsage=*/.2); diff --git a/src/main/java/com/google/devtools/build/lib/rules/java/JavaCompilationHelper.java b/src/main/java/com/google/devtools/build/lib/rules/java/JavaCompilationHelper.java index e4f654b941..e5ae7e7dbc 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/java/JavaCompilationHelper.java +++ b/src/main/java/com/google/devtools/build/lib/rules/java/JavaCompilationHelper.java @@ -340,34 +340,25 @@ public final class JavaCompilationHelper extends BaseJavaCompilationHelper { */ public void createGenJarAction(Artifact classJar, Artifact manifestProto, Artifact genClassJar) { - ImmutableList<String> jvmOpts = - ImmutableList.of("-XX:+TieredCompilation", "-XX:TieredStopAtLevel=1", GENCLASS_MAX_MEMORY); - getRuleContext() - .registerAction( - new SpawnAction.Builder() - .addInput(manifestProto) - .addInput(classJar) - .addOutput(genClassJar) - .addTransitiveInputs(getHostJavabaseInputsNonStatic(getRuleContext())) - .setJarExecutable( - getRuleContext() - .getHostConfiguration() - .getFragment(Jvm.class) - .getJavaExecutable(), - getGenClassJar(ruleContext), - jvmOpts) - .setCommandLine( - CustomCommandLine.builder() - .addExecPath("--manifest_proto", manifestProto) - .addExecPath("--class_jar", classJar) - .addExecPath("--output_jar", genClassJar) - .add("--temp_dir") - .addPath(tempDir(genClassJar)) - .build()) - .useParameterFile(ParameterFileType.SHELL_QUOTED) - .setProgressMessage("Building genclass jar " + genClassJar.prettyPrint()) - .setMnemonic("JavaSourceJar") - .build(getRuleContext())); + getRuleContext().registerAction(new SpawnAction.Builder() + .addInput(manifestProto) + .addInput(classJar) + .addOutput(genClassJar) + .addTransitiveInputs(getHostJavabaseInputsNonStatic(getRuleContext())) + .setJarExecutable( + getRuleContext().getHostConfiguration().getFragment(Jvm.class).getJavaExecutable(), + getGenClassJar(ruleContext), + ImmutableList.of("-client", GENCLASS_MAX_MEMORY)) + .setCommandLine(CustomCommandLine.builder() + .addExecPath("--manifest_proto", manifestProto) + .addExecPath("--class_jar", classJar) + .addExecPath("--output_jar", genClassJar) + .add("--temp_dir").addPath(tempDir(genClassJar)) + .build()) + .useParameterFile(ParameterFileType.SHELL_QUOTED) + .setProgressMessage("Building genclass jar " + genClassJar.prettyPrint()) + .setMnemonic("JavaSourceJar") + .build(getRuleContext())); } /** Returns the GenClass deploy jar Artifact. */ diff --git a/src/main/java/com/google/devtools/build/lib/rules/java/JavaOptions.java b/src/main/java/com/google/devtools/build/lib/rules/java/JavaOptions.java index 5dafe2a6e6..642ec850a2 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/java/JavaOptions.java +++ b/src/main/java/com/google/devtools/build/lib/rules/java/JavaOptions.java @@ -357,9 +357,7 @@ public class JavaOptions extends FragmentOptions { JavaOptions host = (JavaOptions) getDefault(); host.javaBase = hostJavaBase; - host.jvmOpts = - ImmutableList.of( - "-XX:+TieredCompilation", "-XX:TieredStopAtLevel=1", "-XX:ErrorFile=/dev/stderr"); + host.jvmOpts = ImmutableList.of("-client", "-XX:ErrorFile=/dev/stderr"); host.javacOpts = javacOpts; host.javaToolchain = hostJavaToolchain; diff --git a/src/main/java/com/google/devtools/build/lib/rules/java/JavaToolchainRule.java b/src/main/java/com/google/devtools/build/lib/rules/java/JavaToolchainRule.java index 4d20691236..db588621f1 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/java/JavaToolchainRule.java +++ b/src/main/java/com/google/devtools/build/lib/rules/java/JavaToolchainRule.java @@ -83,10 +83,7 @@ public final class JavaToolchainRule implements RuleDefinition { The list of arguments for the JVM when invoking the Java compiler. Please refer to the Java virtual machine documentation for the extensive list of possible flags for this option. <!-- #END_BLAZE_RULE.ATTRIBUTE --> */ - .add( - attr("jvm_opts", STRING_LIST) - .value( - ImmutableList.<String>of("-XX:+TieredCompilation", "-XX:TieredStopAtLevel=1"))) + .add(attr("jvm_opts", STRING_LIST).value(ImmutableList.<String>of("-client"))) /* <!-- #BLAZE_RULE(java_toolchain).ATTRIBUTE(javac) --> Label of the javac jar. <!-- #END_BLAZE_RULE.ATTRIBUTE --> */ diff --git a/src/main/java/com/google/devtools/build/lib/rules/java/SingleJarActionBuilder.java b/src/main/java/com/google/devtools/build/lib/rules/java/SingleJarActionBuilder.java index 59e41c04a7..00b24779a5 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/java/SingleJarActionBuilder.java +++ b/src/main/java/com/google/devtools/build/lib/rules/java/SingleJarActionBuilder.java @@ -61,20 +61,20 @@ public final class SingleJarActionBuilder { ruleContext.getHostConfiguration().getFragment(Jvm.class).getJavaExecutable(); NestedSet<Artifact> hostJavabaseInputs = JavaHelper.getHostJavabaseInputs(ruleContext); Artifact singleJar = getSingleJar(ruleContext); - ImmutableList<String> jvmOpts = - ImmutableList.of("-XX:+TieredCompilation", "-XX:TieredStopAtLevel=1", SINGLEJAR_MAX_MEMORY); - ruleContext.registerAction( - new SpawnAction.Builder() - .addOutput(outputJar) - .addInputs(resources.values()) - .addInputs(resourceJars) - .addTransitiveInputs(hostJavabaseInputs) - .setJarExecutable(javaPath, singleJar, jvmOpts) - .setCommandLine(sourceJarCommandLine(outputJar, resources, resourceJars)) - .useParameterFile(ParameterFileType.SHELL_QUOTED) - .setProgressMessage("Building source jar " + outputJar.prettyPrint()) - .setMnemonic("JavaSourceJar") - .build(ruleContext)); + ruleContext.registerAction(new SpawnAction.Builder() + .addOutput(outputJar) + .addInputs(resources.values()) + .addInputs(resourceJars) + .addTransitiveInputs(hostJavabaseInputs) + .setJarExecutable( + javaPath, + singleJar, + ImmutableList.of("-client", SINGLEJAR_MAX_MEMORY)) + .setCommandLine(sourceJarCommandLine(outputJar, resources, resourceJars)) + .useParameterFile(ParameterFileType.SHELL_QUOTED) + .setProgressMessage("Building source jar " + outputJar.prettyPrint()) + .setMnemonic("JavaSourceJar") + .build(ruleContext)); } /** Returns the SingleJar deploy jar Artifact. */ |