*9904304e07- (tag: build-1.4.0-dev-4271) (CoroutineDebugger) StackFrameInterceptor service added to KotlinPositionManager, dependency cleanup (vor 23 Stunden) <Vladimir Ilmov> *0af61293d5- (tag: build-1.4.0-dev-4269) Fix ExtensionTestUtil compilation for 191; CustomUsageSearcherTest compilation for 201 (vor 2 Tagen) <Vladimir Dolzhenko> *57fd449288- (tag: build-1.4.0-dev-4260) Minor, add check of const field modifiers to codegen test (vor 3 Tagen) <Alexander Udalov> *1e3e791d43- (tag: build-1.4.0-dev-4257) Fix compilation error in `MLCompletionForKotlin` bunch files (vor 3 Tagen) <Roman Golyshev> *9daed1f2c6- (tag: build-1.4.0-dev-4256, tag: build-1.4.0-dev-4252) Revert "[FIR-TEST] Move FIR ide tests to separate module" (vor 3 Tagen) <Dmitriy Novozhilov> *bdd88e1655- (tag: build-1.4.0-dev-4249) JVM_IR: place suspend markers in faux lambdas around inline references (vor 3 Tagen) <pyos> *f29e665dce- (tag: build-1.4.0-dev-4245) Add "ML completion for Kotlin" experimental feature checkbox (vor 3 Tagen) <Roman Golyshev> *4c6ea7c26a- (tag: build-1.4.0-dev-4241) KT-36808 Sink down member function `Flow.collect` in the completion (vor 3 Tagen) <Roman Golyshev> *d27954a6d4- (tag: build-1.4.0-dev-4237, tag: build-1.4.0-dev-4234) [IR] Use erased types in backing field initializer in case of generic delegated property (vor 3 Tagen) <Roman Artemev> *13a73b67de- [IR] Fix IrPropertyReference for delegated property (vor 3 Tagen) <Roman Artemev> *34c17e2bed- [KLIB] Add regression to about VarAsFun type parameter leak (vor 3 Tagen) <Roman Artemev> *8c1772d623- [KLIB] Add regression test (vor 3 Tagen) <Roman Artemev> *09239743c1- (tag: build-1.4.0-dev-4228) Fix compilation KotlinCopyPasteReferenceProcessor for 191, 192 (vor 3 Tagen) <Vladimir Dolzhenko> *123311007b- (tag: build-1.4.0-dev-4227) Fix compilation CustomUsageSearcherTest for 191, 201 (vor 3 Tagen) <Vladimir Dolzhenko> *31776d9a3b- (tag: build-1.4.0-dev-4226) [CFA] Mark arguments of all annotation calls as `USED_AS_EXPRESSION` (vor 3 Tagen) <Dmitriy Novozhilov> *b9ffed3f04- (tag: build-1.4.0-dev-4225) Replace `ConfigurationFactory` with `SimpleConfigurationType` (vor 3 Tagen) <Dmitry Gridin> *43d6ddd405- (tag: build-1.4.0-dev-4220) Minor, fix typo in KotlinChunk.kt (vor 3 Tagen) <Alexander Udalov> *20c4a7b244- (tag: build-1.4.0-dev-4217) [FIR2IR] Introduce staged transformation (first step) (vor 3 Tagen) <Mikhail Glukhikh> *a9f7ff254b- (tag: build-1.4.0-dev-4215) Add -Xno-optimized-callable-references to disable KT-27362 optimization (vor 3 Tagen) <Alexander Udalov> *ae4629a5a6- (tag: build-1.4.0-dev-4214) Fetch analysis results if it is available (vor 3 Tagen) <Vladimir Dolzhenko> *7cf8697e30- (tag: build-1.4.0-dev-4209) [JS BEs] use star projection when type parameter used recursively (vor 3 Tagen) <Zalim Bashorov> *8c7562d338- [CJS BE] don't crash when intersection types passed for a reified parameter (vor 3 Tagen) <Zalim Bashorov> *415893b8aa- [JS CLI] revert disabling NI by default (vor 4 Tagen) <Zalim Bashorov> *5188bc6584- [JS FE] remove unused ReleaseCoroutinesDisabledLanguageVersionSettings (vor 4 Tagen) <Zalim Bashorov> *87242b419a- (tag: build-1.4.0-dev-4207) Improvements in KotlinCopyPasteReferenceProcessor (vor 4 Tagen) <Vladimir Dolzhenko> *b1c4b5f51b- (tag: build-1.4.0-dev-4203) NI: Analyze lambdas which are return arguments of another lambda (vor 4 Tagen) <Victor Petukhov> *426738b7d4- (tag: build-1.4.0-dev-4199) JVM_IR: Cache stubs in CollectionStubMethodLowering (vor 4 Tagen) <Georgy Bronnikov> *92268c8144- JVM_IR: do not generate excessive stubs for immutable collections (vor 4 Tagen) <Georgy Bronnikov> *9955f342c0- (tag: build-1.4.0-dev-4189) [FIR-TEST] Move FIR ide tests to separate module (vor 4 Tagen) <Dmitriy Novozhilov> *b1fac4e721- (tag: build-1.4.0-dev-4186) Implement reduceIndexedOrNull and reduceRightIndexedOrNull #KT-36866 (vor 4 Tagen) <Abduqodiri Qurbonzoda> *b60633d79a- Add associateWith to Array<T> #KT-30372 (vor 4 Tagen) <Abduqodiri Qurbonzoda> *e632d58936- (tag: build-1.4.0-dev-4185) Nullable Array.contentEquals/contentHashCode/contentToString #KT-34161 (vor 4 Tagen) <Abduqodiri Qurbonzoda> *179ec41a6b- (tag: build-1.4.0-dev-4183) [JS BEs] Generate tests for whole "codegen/boxInline" (vor 4 Tagen) <Zalim Bashorov> *fe3a81ebc9- [JS BEs] Minor: fix warnings in abstract classes for generated tests (vor 4 Tagen) <Zalim Bashorov> *c664bfc62b- (tag: build-1.4.0-dev-4179) Update property delegate test data (vor 4 Tagen) <Abduqodiri Qurbonzoda> *3762b5cba7- (tag: build-1.4.0-dev-4170) Minor, remove extraneous field CodegenTestCase.coroutinesPackage (vor 4 Tagen) <Alexander Udalov> *244db9bcf9- JVM IR: don't rename fake overrides for fields (vor 4 Tagen) <Alexander Udalov> *9ceca69154- (tag: build-1.4.0-dev-4169) Do not stop searchTextOccurrences when isSearchForTextOccurrences is false (vor 4 Tagen) <kovalp> *6fd8ccc293- (tag: build-1.4.0-dev-4166) [FIR2IR] Support (simple) conversion of captured types (vor 4 Tagen) <Mikhail Glukhikh> *e919e7b79a- (tag: build-1.4.0-dev-4157) [Gradle][Native][Cache] Don't skip metadata-based interop libraries (vor 4 Tagen) <Sergey Bogolepov> *c0b15b1768- (tag: build-1.4.0-dev-4155) KT-37448 'this' in delegating constructor call may refer to outer object (vor 4 Tagen) <Dmitry Petrov> *2bd5872782- (tag: build-1.4.0-dev-4152) 201: [Gradle, JS] Non jvm configurator from xml including (vor 4 Tagen) <Ilya Goncharov> *dc2dd2e3e3- [Gradle, JS] Remove idle test runner (vor 4 Tagen) <Ilya Goncharov> *8c8307d0d2- 201: [Gradle, JS] Remove redundant non jvm configurator for 201 (vor 4 Tagen) <Ilya Goncharov> *857f3335bb- [Gradle, JS] TestFramework is public to detect it in debug extension (vor 4 Tagen) <Ilya Goncharov> *3728dd45ce- [Gradle, JS] Remove redundant hacks for debug (vor 4 Tagen) <Ilya Goncharov> *7efab887aa- (tag: build-1.4.0-dev-4151) JVM_IR: Do not generate accessor for private function (vor 4 Tagen) <Ilmir Usmanov>
Kotlin/Native
Kotlin/Native is an LLVM backend for the Kotlin compiler, runtime implementation, and native code generation facility using the LLVM toolchain.
Kotlin/Native is primarily designed to allow compilation for platforms where virtual machines are not desirable or possible (such as iOS or embedded targets), or where a developer is willing to produce a reasonably-sized self-contained program without the need to ship an additional execution runtime.
Prerequisites:
- install JDK for your platform, instead of JRE. The build requires
tools.jar, which is not included in JRE; - on macOS install Xcode 11
- on Fedora 26+
yum install ncurses-compat-libsmay be needed - on recent Ubuntu
apt install libncurses5is needed
To compile from sources use following steps:
First, download dependencies:
./gradlew dependencies:update
Then, build the compiler and libraries:
./gradlew bundle
To build with experimental targets support compile with -Porg.jetbrains.kotlin.native.experimentalTargets.
The build can take about an hour on a Macbook Pro. To run a shorter build with only the host compiler and libraries, run:
./gradlew dist distPlatformLibs
To include Kotlin compiler in composite build and build
against it, use the kotlinProjectPath project property:
./gradlew dist -PkotlinProjectPath=path/to/kotlin/project
It's possible to include in a composite build both Kotlin compiler and Kotlin/Native Shared simultaneously.
After that, you should be able to compile your programs like this:
export PATH=./dist/bin:$PATH
kotlinc hello.kt -o hello
For an optimized compilation, use -opt:
kotlinc hello.kt -o hello -opt
For tests, use:
./gradlew backend.native:tests:run
To generate interoperability stubs, create a library definition file
(refer to samples/tetris/.../sdl.def), and run the cinterop tool like this:
cinterop -def lib.def
See the provided samples and INTEROP.md for more details.
The Interop tool generates a library in the .klib library format. See LIBRARIES.md
for more details on this file format.