*df0a86ea57- (tag: build-1.3.70-dev-2665) Add NOP as first instruction in coroutine's try blocks (19 hours ago) <Ilmir Usmanov> *4777dd652b- [FIR] Add tests to catch issues with smartcasting of accesses to functions and properties (type information is stored for the symbol and ALL accesses to the same symbol are smartcasted). (19 hours ago) <Mark Punzalan> *f031b47363- [FIR] Fix issue with multiple smartcasts of `this`. (19 hours ago) <Mark Punzalan> *91f97fa611- [FIR] Support FirCheckNotNullCall in HTML dump. (19 hours ago) <Mark Punzalan> *6e00df06e8- [FIR] Add data flow analysis for FirCheckNotNullCall. (19 hours ago) <Mark Punzalan> *692a83f7bb- [FIR] Add FirCheckNotNullCall converted to CHECK_NOT_NULL intrinsic function call. (19 hours ago) <Mark Punzalan> *6bc0fe121a- (tag: build-1.3.70-dev-2660) Gradle: Escape TC service messages in debug logs (20 hours ago) <Ilya Matveev> *33df86338b- Gradle, tests: Improve tests for running simulator unit-tests (20 hours ago) <Ilya Matveev> *254864a49d- Gradle, native, JS: Support excluding tests using TestFilter (20 hours ago) <Ilya Matveev> *cc3438f20c- Gradle, native: Add separate classes for targets with different tests (20 hours ago) <Ilya Matveev> *e6ab70c18d- Gradle, native: Support simulator tests (20 hours ago) <Ilya Matveev> *8225c5a9ce- (tag: build-1.3.70-dev-2659) Remove obsolete logic to `IS_BUILT_WITH_ASM6` (20 hours ago) <Mikhael Bogdanov> *a92f58b1ac- (tag: build-1.3.70-dev-2657) Revert "NI: Prefer nullable lower bound to flexible one when substitution of type variable is performed ^KT-32435 Fixed" (21 hours ago) <victor.petukhov> *ccea2b73da- (tag: build-1.3.70-dev-2654) [Gradle, JS] Add using Debuggable non headless chrome (22 hours ago) <Ilya Goncharov> *354be2b14f- (tag: build-1.3.70-dev-2653) [minor] Change expression evaluation cli argument to -Xexpression (22 hours ago) <Ilya Chernikov> *ba056bf78c- [minor] Remove irrelevant part of the test (22 hours ago) <Ilya Chernikov> *748cbd7eec- (tag: build-1.3.70-dev-2652) Import Kotlin JUnit run configuration settings from Gradle (22 hours ago) <Yan Zhulanow> *0a9a08eab6- Rename Kotlin-specific Gradle configuration to "Kotlin Gradle" to avoid disambiguation (22 hours ago) <Yan Zhulanow> *1bdff8f884- Rename Kotlin-specific JUnit configuration to "Kotlin JUnit" to avoid disambiguation (22 hours ago) <Yan Zhulanow> *8477c1935c- Run configuration: do not contain FQN in name (22 hours ago) <Toshiaki Kameyama> *ce21a55943- Debugger: Add IR-powered ranking tests (22 hours ago) <Yan Zhulanow> *31596f0d0b- Formatter: fix some cases of call chain with `wrap first call chain` #KT-35388 Fixed (22 hours ago) <Dmitry Gridin> *e7ff0315d4- Formatter: fix line break before value parameter with annotation #KT-23811 Fixed (22 hours ago) <Dmitry Gridin> *f05a452ef2- (tag: build-1.3.70-dev-2650) [coroutine][debugger] Unit test support added for Gradle run configurations. (22 hours ago) <Vladimir Ilmov> *82cdcb421b- jdi.StringReferenceImpl references replaced with StringReference (22 hours ago) <Vladimir Ilmov> *e2010cb90d- (tag: build-1.3.70-dev-2646) Do not cast to jdi impl classes (23 hours ago) <Egor Ushakov> *038ec8edcf- (tag: build-1.3.70-dev-2644) Rethrow ProcessCanceledException in FIR resolve (23 hours ago) <Mikhail Glukhikh> *2b82618715- Fix unresolved references in bunch generate tests (23 hours ago) <Mikhail Glukhikh> *9e263b6af2- FIR IDE: use registry to obtain kotlin.use.fir.resolution (23 hours ago) <Mikhail Glukhikh> *cad0d7ff7f- (tag: build-1.3.70-dev-2643) Fix compilation of maven-plugin test after508330e0bb(23 hours ago) <Mikhail Zarechenskiy> *09c2b92b1d- (tag: build-1.3.70-dev-2640) NI: Prefer nullable lower bound to flexible one when substitution of type variable is performed ^KT-32435 Fixed (24 hours ago) <Victor Petukhov> *78dfcef160- (tag: build-1.3.70-dev-2635) JVM_IR: move generateParameterNames to FunctionCodegen.kt (26 hours ago) <pyos> *13a2879b78- JVM_IR: generate more correct parameter metadata (26 hours ago) <pyos> *cf86dc9a89- (tag: build-1.3.70-dev-2634) KT-20357: Add sample for Collections distinct and distinctBy methods (28 hours ago) <Tillmann Berg> *f0e67f8397- (tag: build-1.3.70-dev-2633) Fix coreLibsInstall composite task (30 hours ago) <Ilya Gorbunov> *6792d22c31- (tag: build-1.3.70-dev-2613) Fix minor bugs for UL methods and parameters representation (2 days ago) <Igor Yakovlev> *094de9fb5e- (tag: build-1.3.70-dev-2606) IR: Do not capture variables from method calls in ClosureAnnotator (2 days ago) <Georgy Bronnikov> *344bc33096- (tag: build-1.3.70-dev-2602) [FIR TEST]: add problematic test with WeakHashMap.get ambiguity (2 days ago) <Mikhail Glukhikh> *12f17a6724- (tag: build-1.3.70-dev-2600) "Add constructor parameters" quick fix should add default parameters from super class (#2869) (2 days ago) <Toshiaki Kameyama> *f0298aad77- (tag: build-1.3.70-dev-2598) FIR: Refine SAM support for methods with names from j.l.Object (2 days ago) <Denis Zharkov> *e89c777fc6- FIR: Create DefinitelyNotNull only for annotated types (2 days ago) <Denis Zharkov> *56cae75404- (tag: build-1.3.70-dev-2595) Fix StringBuilder reverse test (2 days ago) <Abduqodiri Qurbonzoda> *edf5675415- (tag: build-1.3.70-dev-2593) [FIR TEST]: add problematic test with covariant array as receiver (2 days ago) <Mikhail Glukhikh> *7d62e3ce56- FIR: fix hasTopLevelClassOf optimization in deserialized provider (2 days ago) <Mikhail Glukhikh> *fa89aa0b49- Do not use member scope provider from FIR resolution API (2 days ago) <Mikhail Glukhikh> *718a679b72- FIR IDE API: add preliminary control of file in-block modifications (2 days ago) <Mikhail Glukhikh> *83ccd7dd1c- FIR: implement separate diagnostic collector/reporter for IDE (2 days ago) <Mikhail Glukhikh> *fbf1dbf2da- FIR: introduce error message renderer (2 days ago) <Mikhail Glukhikh> *e07b85ff34- FIR Java providers: insert some protection against ProcessCanceledException (2 days ago) <Mikhail Glukhikh> *cd089658bd- IdeFirProvider: insert protection against ProcessCanceledException (2 days ago) <Mikhail Glukhikh> *fc117466a8- AbstractFirPsiCheckerTest: do partial error diagnostic comparison for some cases (2 days ago) <Mikhail Glukhikh> *4b251eb986- FIR IDE: lock FIR files before calling runResolve on them (2 days ago) <Mikhail Glukhikh> *63121df6ba- Synchronized IdeFirProvider.getOrBuild file, don't share RawFirBuilder (2 days ago) <Mikhail Glukhikh> *ccb343e26b- FIR: preliminary implementation of diagnostics highlighter (~30% supported) (2 days ago) <Mikhail Glukhikh> *34202faaa5- Code cleanup: KotlinPsiChecker (2 days ago) <Mikhail Glukhikh> *1d6d88b50c- FIR reference resolve test: observe mute tests which are actually passing (2 days ago) <Mikhail Glukhikh> *f8c86d2f9f- FIR reference resolve test: mute 37/107 cases which aren't yet supported (2 days ago) <Mikhail Glukhikh> *900227fdfa- KtReferenceResolver: implement resolveToPsiElements() via FE IR (~60% supported) (2 days ago) <Mikhail Glukhikh> *809b7d8381- FirResolution: store enabled value in field with initial reading from component (2 days ago) <Mikhail Glukhikh> *0d2d76696c- Add FirResolution.enabled wrapper (2 days ago) <Mikhail Glukhikh> *00112d4227- (tag: build-1.3.70-dev-2588) [FIR] Copy receiver of delegateProvider in fir building (2 days ago) <Dmitriy Novozhilov> *51560f2f17- [FIR] Fix order of resolving children of FirProperty (2 days ago) <Dmitriy Novozhilov> *e281d224a3- [FIR] Fix testdata broken inb76c984b(2 days ago) <Dmitriy Novozhilov> *a89e9966e6- [FIR] Fix call completion of complex constant expressions with integer contants (2 days ago) <Dmitriy Novozhilov> *f8b1e95830- (tag: build-1.3.70-dev-2583, origin/rr/gradle/ilgonmic/debugger-js) [Gradle, JS] Inline single used method for prefix matching (2 days ago) <Ilya Goncharov> *8c6941dc5b- [Gradle, JS] Java and JS difference in fqn should affect exclude patterns too (2 days ago) <Ilya Goncharov> *770e5147d0- [Gradle, JS] Java and JS difference in fqn should affect exclude patterns too (2 days ago) <Ilya Goncharov> *da16d48068- (tag: build-1.3.70-dev-2580) [Gradle, JS] Remove debug console (2 days ago) <Ilya Goncharov> *096a6c9551- [Gradle, JS] Fix failing Karma tests for empty tests (2 days ago) <Ilya Goncharov> *36d87c9905- (tag: build-1.3.70-dev-2579) Mute GradleMultiplatformWizardTest (2 days ago) <Natalia Selezneva> *b66fdad80c- Set since build to IDEA 192.7142.36 for 192 bunch (2 days ago) <Natalia Selezneva> *19e001afad- (tag: build-1.3.70-dev-2571, tag: build-1.3.70-dev-2570) Commonize Float.rangeTo(Float) #KT-35299 (3 days ago) <Abduqodiri Qurbonzoda> *b76c984b26- (tag: build-1.3.70-dev-2563) [FIR] Support IntegerLiteralTypes (3 days ago) <Dmitriy Novozhilov> *5577f0f8cb- [TMP] Make context in inference components universal (3 days ago) <Dmitriy Novozhilov> *4f3ff84d30- [FIR] [TMP] Complete lambdas that are not part of some call (3 days ago) <Dmitriy Novozhilov> *e560a67a89- [FIR] Resolve this reference in delegating constructors (3 days ago) <Dmitriy Novozhilov> *583e07b3e4- [FIR] Don't analyze properties twice (3 days ago) <Dmitriy Novozhilov> *99b0435de5- (tag: build-1.3.70-dev-2529) Add possibility for JDKs substitution in the build script... (6 days ago) <Ilya Chernikov>
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.