8372023: Javac JMH failures

Reviewed-by: liach
This commit is contained in:
Vicente Romero 2025-11-20 18:47:55 +00:00
parent aa7718d1d2
commit 0187f4df96
2 changed files with 7 additions and 1 deletions

View File

@ -28,6 +28,12 @@
<version>1.0-SNAPSHOT</version>
<name>OpenJDK Microbenchmark of Java Compile</name>
<properties>
<!--
the code below is being compiled with source 25, see JDK-8372023,
if the source version being compiled changes to 26 or 26+, then
some adjustments will be needed at:
test/benchmarks/micros-javac/src/main/java/org/openjdk/bench/langtools/javac/JavacBenchmark.java
-->
<javac.benchmark.openjdk.zip.download.url>https://download.java.net/openjdk/jdk11/ri/openjdk-11+28_windows-x64_bin.zip</javac.benchmark.openjdk.zip.download.url>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<jmh.version>1.36</jmh.version>

View File

@ -188,7 +188,7 @@ public class JavacBenchmark {
};
}
}) {
String[] cmdLine = new String[] {"-XDcompilePolicy=simple", "-implicit:none", "-nowarn", "--module-source-path", root.toString(), "-d", root.toString(), "-XDignore.symbol.file=true", "@" + srcList.toString()};
String[] cmdLine = new String[] {"-source", "25", "-XDcompilePolicy=simple", "-implicit:none", "-nowarn", "--module-source-path", root.toString(), "-d", root.toString(), "-XDignore.symbol.file=true", "@" + srcList.toString()};
if (new Main("javac").compile(cmdLine, ctx).exitCode != 0) {
throw new IOException("compilation failed");
}