Support injecting custom module into KotlinBuiltIns
Provide a command-line option to load built-ins from the module and its dependencies instead of looking for them in kotlin-compiler.jar; built-ins must be found this way, or an error will be reported (or, most likely at this moment, an exception will be thrown). Note that this does not affect whether built-ins (loaded from one place or the other) are added to the _dependencies_ of the module, this is controlled by another option. The option added in this commit only makes the KotlinBuiltIns instance which is used via ModuleDescriptor throughout the compiler front-end (and also injected in a bunch of places) a sort of "helper" which always goes to that same module to find descriptors for built-in classes
This commit is contained in:
+3
@@ -104,6 +104,9 @@ public class K2JVMCompilerArguments extends CommonCompilerArguments {
|
||||
@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 = "Xload-builtins-from-dependencies", description = "Load definitions of built-in declarations from module dependencies, instead of from the compiler")
|
||||
public boolean loadBuiltInsFromDependencies;
|
||||
|
||||
@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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user