*ab56ec7481- (tag: build-1.4.0-dev-5111) [Gradle, JS] Use standard instance filtering (vor 5 Stunden) <Ilya Goncharov> *bc22489aab- [Gradle, JS] Fix link task options for IR tooling (vor 5 Stunden) <Ilya Goncharov> *f011d2794a- (tag: build-1.4.0-dev-5109) Fix freeze on configure kotlin for the project (vor 6 Stunden) <Vladimir Dolzhenko> *2c69d82916- (tag: build-1.4.0-dev-5102) Update directory-maven-plugin to the latest version: 0.3.1 (vor 8 Stunden) <Ilya Gorbunov> *9bbfe9c1ac- (tag: build-1.4.0-dev-5097, origin/rr/ddol/work2) Rename: KonanPlatform, KonanPlatforms -> NativePlatform, NativePlatforms (vor 20 Stunden) <Dmitriy Dolovov> *dfbbae3991- IDE, Common: Don't create KLIB metadata factories for each new KLIB (vor 20 Stunden) <Dmitriy Dolovov> *5b9770a4dd- IDE, JS: Don't create KLIB metadata factories for each new KLIB library (vor 20 Stunden) <Dmitriy Dolovov> *cc6e4e5cfb- IDE, Native: Don't produce CompositePackageFragmentProvider when unnecessary (vor 20 Stunden) <Dmitriy Dolovov> *87da4be9bb- (tag: build-1.4.0-dev-5087) Move parametersMap.kt to 'cli-common' (vor 2 Tagen) <Alexander Udalov> *92534eadaa- Remove dependency of 'resolution' on 'deserialization' (vor 2 Tagen) <Alexander Udalov> *b6fdc96994- Reverse dependency 'psi' <-> 'frontend.common' (vor 2 Tagen) <Alexander Udalov> *d70271b6aa- Move RequireKotlinNames to 'descriptors' (vor 2 Tagen) <Alexander Udalov> *844b0078ba- Minor, remove unneeded dependency of 'js.parser' on 'util' (vor 2 Tagen) <Alexander Udalov> *9dd8b1821a- Move CoroutineLanguageVersionSettingsUtil to 'config' (vor 2 Tagen) <Alexander Udalov> *db9347cb56- Move JVM-specific analysis flags to 'config.jvm' (vor 2 Tagen) <Alexander Udalov> *7bb77e5672- Move JS binary version utilities to 'js.config' (vor 2 Tagen) <Alexander Udalov> *fe5104b865- Move package org.jetbrains.kotlin.incremental.js to 'js.config' (vor 2 Tagen) <Alexander Udalov> *4dcd0d1cb6- Extract module 'config' out of 'frontend' (vor 2 Tagen) <Alexander Udalov> *143aef938b- Extract module 'js.config' out of 'js.frontend' (vor 2 Tagen) <Alexander Udalov> *15d2a06132- Extract module 'config.jvm' out of 'frontend.java' (vor 2 Tagen) <Alexander Udalov> *90ae416b72- Minor, move KotlinTypeRefinerImpl out of 'config' package (vor 2 Tagen) <Alexander Udalov> *4aa47be202- Move CommonResolverForModuleFactory to 'frontend' (vor 2 Tagen) <Alexander Udalov> *9e014e462b- Do not use CommonPlatforms directly in CommonResolverForModuleFactory (vor 2 Tagen) <Alexander Udalov> *8dd04789ad- Remove obsolete InlineStrategy (vor 2 Tagen) <Alexander Udalov> *4156a9c80b- Extract javac-wrapper into a separate module (vor 2 Tagen) <Alexander Udalov> *aad7354a3b- Minor, remove obsolete jvmTarget modifications in compiler modules (vor 2 Tagen) <Alexander Udalov> *f403a0da82- (tag: build-1.4.0-dev-5080) README Update IDEA plugin dist path (vor 2 Tagen) <Victor Turansky> *d808ef10b2- (tag: build-1.4.0-dev-5075) Added some tests on local classes in inline bodies (vor 2 Tagen) <Igor Chevdar> *e2a378bed7- [JS_IR] More subtle local classes copying in inliner (vor 2 Tagen) <Igor Chevdar> *90abf1fda0- [JS_IR] Don't capture the bound receiver of a CR (vor 2 Tagen) <Igor Chevdar> *643e581448- [IR] Supported extraction of local classes from inline bodies (vor 2 Tagen) <Igor Chevdar> *7a48c3a945- [IR] Made currentDeclarationParent nullable (vor 2 Tagen) <Igor Chevdar> *09304bbd54- (tag: build-1.4.0-dev-5074) ConvertToAnonymousObjectFix: do not suggest when there is no lambda (vor 2 Tagen) <Toshiaki Kameyama> *d3c54f664b- (tag: build-1.4.0-dev-5064) Wizard: fix 191 tests (vor 3 Tagen) <Ilya Kirillov> *8447701d74- (tag: build-1.4.0-dev-5057) Use stable order and constant timestamps in merged sources jar (vor 3 Tagen) <Ilya Gorbunov> *042424d599- (tag: build-1.4.0-dev-5052) KT-27524 Don't box (some) inline classes in suspend fun return (vor 3 Tagen) <Dmitry Petrov> *d8bc29e6c6- (tag: build-1.4.0-dev-5051) [FIR] Eliminate obsolete NO_SUPERTYPE diagnostic from builder (vor 3 Tagen) <Mikhail Glukhikh> *b38d30bab0- [FIR] Support several super-related diagnostics (vor 3 Tagen) <Nick> *5570a5fe74- (tag: build-1.4.0-dev-5049) [JVM_IR] Use iinc for incrementing Int variables. (vor 3 Tagen) <Mads Ager> *58685be4e2- (tag: build-1.4.0-dev-5047, tag: build-1.4.0-dev-5043) IR: Don't use IrStringConcatenation for ordinary toString calls (vor 3 Tagen) <Steven Schäfer> *c1b9fdd2f3- (tag: build-1.4.0-dev-5038) Fix diagnostic test data to be consistent with FIR test data (vor 3 Tagen) <Mikhail Glukhikh> *c518868c03- Disable UnusedMainParameterInspection by default (vor 3 Tagen) <Mikhail Glukhikh> *7bfd354a77- Don't report UNUSED_PARAMETER in main from object #KT-37718 Fixed (vor 3 Tagen) <Mikhail Glukhikh> *cec0f58544- [FIR] Introduce & use toFirLightSourceElement (vor 3 Tagen) <Mikhail Glukhikh> *6a5acc024a- [FIR] Rename PSI version of toFirSourceElement (vor 3 Tagen) <Mikhail Glukhikh> *b27152f903- Replace some FIR syntax errors with more proper diagnostics (vor 3 Tagen) <Mikhail Glukhikh> *2f63c8a46a- [FIR] Enhance diagnostic DSL to be able to use concrete factories (vor 3 Tagen) <Mikhail Glukhikh> *a1d81aa15f- (tag: build-1.4.0-dev-5034) [FIR-TEST] Fix diff between FIR and old FE testdata (vor 3 Tagen) <Dmitriy Novozhilov> *b0d96eb140- (tag: build-1.4.0-dev-5026) Revert "Workaround for KT-37302" (vor 3 Tagen) <Georgy Bronnikov> *cd440841a5- (tag: build-1.4.0-dev-5021) Fix regex in KotlinPluginCompatibilityVerifier to support release and milestones (vor 3 Tagen) <Dmitry Savvinov> *dfaebf3cdb- Minor: make KotlinPluginVersion public (vor 3 Tagen) <Dmitry Savvinov> *b7d8e879a6- (tag: build-1.4.0-dev-5016) [FIR] Support 4 diagnostics for pairs of modifiers (vor 3 Tagen) <FenstonSingel> *311a91af79- (tag: build-1.4.0-dev-5010) Fix: forgot to write services for 191 (vor 3 Tagen) <Yaroslav Chernyshev> *674f1d129f- (tag: build-1.4.0-dev-5006) Clean up of plugin-common.xml and convert components to services (vor 3 Tagen) <Vladimir Dolzhenko> *87006036be- (tag: build-1.4.0-dev-5005) [IR] Forbid unbound type parameters (vor 3 Tagen) <Roman Artemev> *6e01ec8dd3- [IR] Fix translation of synthetic generic java properties (vor 3 Tagen) <Roman Artemev> *4bebfd33b9- [IR] Fix unbound type parameter symbol for jvm corner cases (vor 3 Tagen) <Roman Artemev> *48fb279721- (tag: build-1.4.0-dev-5001) [FIR] Add constraint to flexible type for declared argument for java parameter (vor 3 Tagen) <Dmitriy Novozhilov> *3acb64c536- [FIR] Add flexible default upper bound for java type parameters (vor 3 Tagen) <Dmitriy Novozhilov>
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.