Use separate system properties to control IC for JVM and JS

Also this commit effectively disables JS IC by default

     #KT-25563 fixed
This commit is contained in:
Alexey Tsvetkov
2018-07-18 13:26:00 +03:00
parent 625983b28a
commit 0b18380770
22 changed files with 92 additions and 70 deletions
@@ -24,7 +24,7 @@ public class IncrementalCompilation {
private static final String INCREMENTAL_COMPILATION_PROPERTY = "kotlin.incremental.compilation";
private static final String INCREMENTAL_COMPILATION_JS_PROPERTY = "kotlin.incremental.compilation.js";
public static boolean isEnabled() {
public static boolean isEnabledForJvm() {
return "true".equals(System.getProperty(INCREMENTAL_COMPILATION_PROPERTY));
}
@@ -43,7 +43,7 @@ public class IncrementalCompilation {
}
public static void toJvmArgs(List<String> jvmArgs) {
if (isEnabled()) addJvmSystemFlag(jvmArgs, INCREMENTAL_COMPILATION_PROPERTY);
if (isEnabledForJvm()) addJvmSystemFlag(jvmArgs, INCREMENTAL_COMPILATION_PROPERTY);
if (isEnabledForJs()) addJvmSystemFlag(jvmArgs, INCREMENTAL_COMPILATION_JS_PROPERTY);
}