temp fix to run compiler under jdk 9

This commit is contained in:
Dmitry Batkovich
2016-10-18 12:48:06 +03:00
parent bb5dd3c08f
commit a7fb9877ff
@@ -1153,6 +1153,17 @@ public class BuildManager implements Disposable {
cmdLine.addParameters(args);
}
//TODO[Dmitry Batkovich] should be replaced with the proper solution
if (sdkVersion != null && sdkVersion.isAtLeast(JavaSdkVersion.JDK_1_9)) {
cmdLine.addParameter("-XaddExports:jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED");
cmdLine.addParameter("-XaddExports:jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED");
cmdLine.addParameter("-XaddExports:jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED");
cmdLine.addParameter("-XaddExports:jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED");
cmdLine.addParameter("-XaddExports:jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED");
cmdLine.addParameter("-XaddExports:jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED");
cmdLine.addParameter("-XaddExports:jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED");
}
@SuppressWarnings("UnnecessaryFullyQualifiedName")
final Class<?> launcherClass = org.jetbrains.jps.cmdline.Launcher.class;