Add option to restore fallback to compiler built-ins + resurrect Maven build
This commit is contained in:
+3
@@ -101,6 +101,9 @@ public class K2JVMCompilerArguments extends CommonCompilerArguments {
|
|||||||
@Argument(value = "Xsingle-module", description = "Combine modules for source files and binary dependencies into a single module")
|
@Argument(value = "Xsingle-module", description = "Combine modules for source files and binary dependencies into a single module")
|
||||||
public boolean singleModule;
|
public boolean singleModule;
|
||||||
|
|
||||||
|
@Argument(value = "Xadd-compiler-builtins", description = "Add definitions of built-in declarations to the compilation classpath (useful with -no-stdlib)")
|
||||||
|
public boolean addCompilerBuiltIns;
|
||||||
|
|
||||||
@Argument(value = "Xinterface-compatibility", description = "Generate DefaultImpls classes for interfaces in JVM target bytecode version 1.8 for binary compatibility with 1.6")
|
@Argument(value = "Xinterface-compatibility", description = "Generate DefaultImpls classes for interfaces in JVM target bytecode version 1.8 for binary compatibility with 1.6")
|
||||||
public boolean interfaceCompatibility;
|
public boolean interfaceCompatibility;
|
||||||
|
|
||||||
|
|||||||
@@ -333,6 +333,7 @@ class K2JVMCompiler : CLICompiler<K2JVMCompilerArguments>() {
|
|||||||
configuration.put(CLIConfigurationKeys.ALLOW_KOTLIN_PACKAGE, arguments.allowKotlinPackage)
|
configuration.put(CLIConfigurationKeys.ALLOW_KOTLIN_PACKAGE, arguments.allowKotlinPackage)
|
||||||
configuration.put(CLIConfigurationKeys.REPORT_PERF, arguments.reportPerf)
|
configuration.put(CLIConfigurationKeys.REPORT_PERF, arguments.reportPerf)
|
||||||
configuration.put(JVMConfigurationKeys.USE_SINGLE_MODULE, arguments.singleModule)
|
configuration.put(JVMConfigurationKeys.USE_SINGLE_MODULE, arguments.singleModule)
|
||||||
|
configuration.put(JVMConfigurationKeys.ADD_BUILT_INS_TO_DEPENDENCIES, arguments.addCompilerBuiltIns)
|
||||||
|
|
||||||
arguments.declarationsOutputPath?.let { configuration.put(JVMConfigurationKeys.DECLARATIONS_JSON_PATH, it) }
|
arguments.declarationsOutputPath?.let { configuration.put(JVMConfigurationKeys.DECLARATIONS_JSON_PATH, it) }
|
||||||
}
|
}
|
||||||
|
|||||||
+1
@@ -9,6 +9,7 @@ where advanced options include:
|
|||||||
-Xskip-metadata-version-check Try loading binary incompatible classes, may cause crashes
|
-Xskip-metadata-version-check Try loading binary incompatible classes, may cause crashes
|
||||||
-Xdump-declarations-to <path> Path to JSON file to dump Java to Kotlin declaration mappings
|
-Xdump-declarations-to <path> Path to JSON file to dump Java to Kotlin declaration mappings
|
||||||
-Xsingle-module Combine modules for source files and binary dependencies into a single module
|
-Xsingle-module Combine modules for source files and binary dependencies into a single module
|
||||||
|
-Xadd-compiler-builtins Add definitions of built-in declarations to the compilation classpath (useful with -no-stdlib)
|
||||||
-Xinterface-compatibility Generate DefaultImpls classes for interfaces in JVM target bytecode version 1.8 for binary compatibility with 1.6
|
-Xinterface-compatibility Generate DefaultImpls classes for interfaces in JVM target bytecode version 1.8 for binary compatibility with 1.6
|
||||||
-Xno-inline Disable method inlining
|
-Xno-inline Disable method inlining
|
||||||
-Xrepeat <count> Repeat compilation (for performance analysis)
|
-Xrepeat <count> Repeat compilation (for performance analysis)
|
||||||
|
|||||||
@@ -34,10 +34,15 @@
|
|||||||
<goals>
|
<goals>
|
||||||
<goal>compile</goal>
|
<goal>compile</goal>
|
||||||
</goals>
|
</goals>
|
||||||
|
<configuration>
|
||||||
|
<args combine.children="append">
|
||||||
|
<arg>-Xadd-compiler-builtins</arg>
|
||||||
|
</args>
|
||||||
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
/**
|
||||||
|
* NOTE: if this script returns false, the build log with more information can be found at tools/kotlin-maven-plugin/target/it/simple/build.log
|
||||||
|
*/
|
||||||
|
|
||||||
import java.util.regex.Pattern
|
import java.util.regex.Pattern
|
||||||
|
|
||||||
class State {
|
class State {
|
||||||
|
|||||||
@@ -107,6 +107,8 @@
|
|||||||
<args combine.children="append">
|
<args combine.children="append">
|
||||||
<arg>-Xdump-declarations-to</arg>
|
<arg>-Xdump-declarations-to</arg>
|
||||||
<arg>${basedir}/target/runtime-declarations.json</arg>
|
<arg>${basedir}/target/runtime-declarations.json</arg>
|
||||||
|
<arg>-cp</arg>
|
||||||
|
<arg>${basedir}/../../../dist/builtins</arg>
|
||||||
</args>
|
</args>
|
||||||
</configuration>
|
</configuration>
|
||||||
</execution>
|
</execution>
|
||||||
|
|||||||
Reference in New Issue
Block a user