Move -Xskip-metadata-version-check from JVM to common arguments

To be used in JS
This commit is contained in:
Alexander Udalov
2017-02-08 19:39:39 +03:00
parent a1a71a01b1
commit 2e8bfde2e7
6 changed files with 7 additions and 5 deletions
@@ -63,6 +63,9 @@ public abstract class CommonCompilerArguments implements Serializable {
@ValueDescription("<count>")
public String repeat;
@Argument(value = "Xskip-metadata-version-check", description = "Load classes with bad metadata version anyway (incl. pre-release classes)")
public boolean skipMetadataVersionCheck;
@Argument(value = "Xallow-kotlin-package", description = "Allow compiling code in package 'kotlin'")
public boolean allowKotlinPackage;
@@ -94,9 +94,6 @@ public class K2JVMCompilerArguments extends CommonCompilerArguments {
@Argument(value = "Xmultifile-parts-inherit", description = "Compile multifile classes as a hierarchy of parts and facade")
public boolean inheritMultifileParts;
@Argument(value = "Xskip-metadata-version-check", description = "Load classes with bad metadata version anyway (incl. pre-release classes)")
public boolean skipMetadataVersionCheck;
@Argument(value = "Xskip-runtime-version-check", description = "Allow Kotlin runtime libraries of incompatible versions in the classpath")
public boolean skipRuntimeVersionCheck;
@@ -235,6 +235,8 @@ public abstract class CLICompiler<A extends CommonCompilerArguments> {
configuration.put(CLIConfigurationKeys.COMPILER_JAR_LOCATOR, locator);
}
configuration.put(CommonConfigurationKeys.SKIP_METADATA_VERSION_CHECK, arguments.skipMetadataVersionCheck);
setupLanguageVersionSettings(configuration, arguments);
}
@@ -312,7 +312,6 @@ class K2JVMCompiler : CLICompiler<K2JVMCompilerArguments>() {
configuration.put(JVMConfigurationKeys.DISABLE_OPTIMIZATION, arguments.noOptimize)
configuration.put(JVMConfigurationKeys.INHERIT_MULTIFILE_PARTS, arguments.inheritMultifileParts)
configuration.put(JVMConfigurationKeys.SKIP_RUNTIME_VERSION_CHECK, arguments.skipRuntimeVersionCheck)
configuration.put(CommonConfigurationKeys.SKIP_METADATA_VERSION_CHECK, arguments.skipMetadataVersionCheck)
configuration.put(CLIConfigurationKeys.ALLOW_KOTLIN_PACKAGE, arguments.allowKotlinPackage)
configuration.put(CLIConfigurationKeys.REPORT_PERF, arguments.reportPerf)
configuration.put(JVMConfigurationKeys.USE_SINGLE_MODULE, arguments.singleModule)
+1
View File
@@ -2,6 +2,7 @@ Usage: kotlinc-js <options> <source files>
where advanced options include:
-Xno-inline Disable method inlining
-Xrepeat <count> Repeat compilation (for performance analysis)
-Xskip-metadata-version-check Load classes with bad metadata version anyway (incl. pre-release classes)
-Xallow-kotlin-package Allow compiling code in package 'kotlin'
-Xplugin <path> Load plugins from the given classpath
-Xmulti-platform Enable experimental language support for multi-platform projects
+1 -1
View File
@@ -5,7 +5,6 @@ where advanced options include:
-Xno-optimize Disable optimizations
-Xreport-perf Report detailed performance statistics
-Xmultifile-parts-inherit Compile multifile classes as a hierarchy of parts and facade
-Xskip-metadata-version-check Load classes with bad metadata version anyway (incl. pre-release classes)
-Xskip-runtime-version-check Allow Kotlin runtime libraries of incompatible versions in the classpath
-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
@@ -14,6 +13,7 @@ where advanced options include:
Load definitions of built-in declarations from module dependencies, instead of from the compiler
-Xno-inline Disable method inlining
-Xrepeat <count> Repeat compilation (for performance analysis)
-Xskip-metadata-version-check Load classes with bad metadata version anyway (incl. pre-release classes)
-Xallow-kotlin-package Allow compiling code in package 'kotlin'
-Xplugin <path> Load plugins from the given classpath
-Xmulti-platform Enable experimental language support for multi-platform projects