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")
|
||||
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")
|
||||
public boolean interfaceCompatibility;
|
||||
|
||||
|
||||
@@ -333,6 +333,7 @@ class K2JVMCompiler : CLICompiler<K2JVMCompilerArguments>() {
|
||||
configuration.put(CLIConfigurationKeys.ALLOW_KOTLIN_PACKAGE, arguments.allowKotlinPackage)
|
||||
configuration.put(CLIConfigurationKeys.REPORT_PERF, arguments.reportPerf)
|
||||
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) }
|
||||
}
|
||||
|
||||
+1
@@ -9,6 +9,7 @@ where advanced options include:
|
||||
-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
|
||||
-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
|
||||
-Xno-inline Disable method inlining
|
||||
-Xrepeat <count> Repeat compilation (for performance analysis)
|
||||
|
||||
Reference in New Issue
Block a user