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:
+2
@@ -10,6 +10,8 @@ where advanced options include:
|
||||
-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)
|
||||
-Xload-builtins-from-dependencies
|
||||
Load definitions of built-in declarations from module dependencies, instead of from the compiler
|
||||
-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