Skip to content

Commit 2e12a35

Browse files
committed
GITHUB#12655: javac options via -J only when the compiler is in forked mode.
1 parent a8fba38 commit 2e12a35

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gradle/hacks/turbocharge-jvm-opts.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ allprojects {
5757
// are not part of up-to-date checks but these are internal JVM flags so we
5858
// don't care.
5959
//
60-
// Pass VM options via -J only with a custom javaHome AND when java toolchains are not used.
61-
if (task.options.forkOptions.javaHome != null && task.javaCompiler.getOrNull() == null) {
60+
// Pass VM options via -J when a custom javaHome is used and we're in fork mode.
61+
if (task.options.fork && task.options.forkOptions.javaHome != null) {
6262
return vmOpts.collect {"-J" + it}
6363
} else {
6464
return vmOpts

0 commit comments

Comments
 (0)