Add setting to enable JS IC for JPS

#KT-25565 fixed
This commit is contained in:
Alexey Tsvetkov
2018-07-18 14:06:55 +03:00
parent 0b18380770
commit eef40a5940
5 changed files with 54 additions and 35 deletions
@@ -21,11 +21,11 @@ import org.jetbrains.annotations.TestOnly;
import java.util.List;
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 final String INCREMENTAL_COMPILATION_JVM_PROPERTY = "kotlin.incremental.compilation";
public static final String INCREMENTAL_COMPILATION_JS_PROPERTY = "kotlin.incremental.compilation.js";
public static boolean isEnabledForJvm() {
return "true".equals(System.getProperty(INCREMENTAL_COMPILATION_PROPERTY));
return "true".equals(System.getProperty(INCREMENTAL_COMPILATION_JVM_PROPERTY));
}
public static boolean isEnabledForJs() {
@@ -34,7 +34,7 @@ public class IncrementalCompilation {
@TestOnly
public static void setIsEnabled(boolean value) {
System.setProperty(INCREMENTAL_COMPILATION_PROPERTY, String.valueOf(value));
System.setProperty(INCREMENTAL_COMPILATION_JVM_PROPERTY, String.valueOf(value));
}
@TestOnly
@@ -43,7 +43,7 @@ public class IncrementalCompilation {
}
public static void toJvmArgs(List<String> jvmArgs) {
if (isEnabledForJvm()) addJvmSystemFlag(jvmArgs, INCREMENTAL_COMPILATION_PROPERTY);
if (isEnabledForJvm()) addJvmSystemFlag(jvmArgs, INCREMENTAL_COMPILATION_JVM_PROPERTY);
if (isEnabledForJs()) addJvmSystemFlag(jvmArgs, INCREMENTAL_COMPILATION_JS_PROPERTY);
}