Commit Graph

29 Commits

Author SHA1 Message Date
Pavel Kunyavskiy ca9ec76c08 [K/N] Replace SymbolName with GCUnsafeCall in interop 2021-09-10 07:46:39 +00:00
Mikhail Glukhikh ffbd574a08 Use -opt-in instead of -Xopt-in in comments and scripts 2021-09-08 23:43:55 +03:00
Dmitriy Novozhilov ca9cbf7eb7 Fix warnings in K/Native code 2021-08-03 07:40:57 +00:00
Sergey Bogolepov a78fcd6b64 [K/N] Separate ClangArgs for jni and native
Since LLVM for Windows is now native instead on MinGW, we have to
compile code in a different environment in case of JNI. This commits
just separates ClangArgs into two subclasses without actual behavior
changes.
2021-08-03 05:42:05 +00:00
Alexander Gorshenev 9148094bbd Garbage collection capable wrappers for skia interop 2021-07-30 12:54:51 +03:00
Ilya Matveev dc8186cb83 [K/N][Interop] Fix throwing exceptions through bridges in opt mode
By default, C functions compiled to bitcode by clang have the
nounwind attribute. If such functions throws an exception, the
behaviour is undefined.

Our interop machinery can process foreign exceptions on call sites
(terminate or wrap them in Kotlin exceptions). But if the interop
bridges have the nounwind attribute, LLVM optimizations (particularly
inlining) may lead to the situation when a foreign exception is ignored by
our foreign exception handler.

This patch fixes the issue by compiling bridges with -fexceptions flag.
This flag makes clang to not set the nounwind attribute, so exceptions
can be thrown through C frames.
2021-07-02 11:51:06 +00:00
Svyatoslav Scherbina 2865d8bd45 Deprecate Obj-C 'alloc' and 'allocWithZone:' methods in Kotlin
Using these methods in Kotlin is usually a mistake.
2021-07-01 12:20:24 +00:00
Vladimir Ivanov 5a0f113e6d [cinterop] Fix type annotation for struct containing anonymous union … (#4289) 2021-05-18 14:34:56 +03:00
Sergey Bogolepov 13464cce68 [Native] Adapt Skia interop to ClangArgs refactoring. 2021-04-30 12:07:46 +00:00
Alexander Gorshenev 887032667d [Kotlin/Native][Interop] Skia interop plugin for cinterop 2021-04-29 21:43:26 +03:00
Vladimir Ivanov 5f582ad28a [Kotlin/Native][Interop] Provide pure c wrappers over cpp for skia interop 2021-04-29 21:43:25 +03:00
Sergey Bogolepov 790fea635d Avoid explicit native targets enumerations 2021-04-08 16:51:45 +03:00
Abduqodiri Qurbonzoda 983985bc68 [K/N] Migrate compiler, interop and others to new case conversion api 2021-04-08 03:22:05 +03:00
Ilya Gorbunov 833955e56d Migrate deprecations in Native compiler
Replacing deprecated Char.toInt() with Char.code and
Number.toChar() with Number.toInt().toChar(), where Number is not Int.

KT-23451
2021-04-07 18:30:21 +03:00
Alexander Udalov 5f7f4a4ac8 Improve API of annotation arguments in kotlinx-metadata
See changes in ChangeLog.md for more information
2021-04-01 22:34:53 +02:00
Vasily Levchenko 905c0c3dd3 [build] version of kotlin native stored in resouces 2021-02-26 12:51:51 +01:00
Vasily Levchenko 3867cf6ef5 [build] switch to kotlin-build-gradle-plugin:0.0.25 2021-02-24 11:07:14 +01:00
Vasily Levchenko 840c1e612c [build] joint (step 2)
- dist:
  - compiler
  - tools(cinterop,klib)
  - stdlib
  - cache
2021-02-24 11:07:13 +01:00
Vasily Levchenko c85c3ac123 [build] joint (step 1)
(cherry picked from commit 7d0775f7e69ab900200bcf1fa78b94d68e6bd4f6)
2021-02-24 11:04:59 +01:00
SvyatoslavScherbina bea8edb10c Return old behaviour for cinterop -output argument suffix handling
(accidentally changed in 976a9fc1)

 #KT-44824 Fixed.
2021-02-24 10:53:42 +01:00
Sergey Bogolepov f6f050ff68 Fix KT-44295
builtins "header" is included in both builtin and posix platform libraries, but only posix has declarations for builtin structs (e.g. __va_list_tag). Library resolver by default has no guarantee on order of resolved libraries which causes KT-44295.
To make results of `KotlinLibraryResolver` stable we pass TopologicalLibraryOrder to `getFullList` and specify a dependency of builtin on posix
2021-02-15 10:16:10 +01:00
Sergey Bogolepov fddf28ac47 Support for macos_arm64 target in backend
(cherry picked from commit 82775e93c1389f21f9be97bd0edfd16dd50300ea)
2021-02-09 09:00:48 +01:00
LepilkinaElena 2331475776 Use klib prefix for temporary directory for klibs (#4686) 2021-02-09 09:00:48 +01:00
Vasily Levchenko 40959c756d Revert "Temporary remove all -Werror flags"
This reverts commit 89c09214eeed951684405c10c233304834a89beb.
2021-02-01 16:54:15 +01:00
Dmitriy Novozhilov 29f68fe7ae Temporary remove all -Werror flags
This is needed for transational period of migrating kotlin repository to compiler with version 1.5

(cherry picked from commit 2836a17952dd47b5b8fe176a0b0374c23567b2ff)
2021-02-01 16:54:15 +01:00
Roman Artemev fde107b181 [KLIB] Adapt new klib io API in K/N
(cherry picked from commit 70fabb6a9db83db5f5b26b54f2656655316ea31c)
2021-02-01 16:54:15 +01:00
Elena Lepilkina f88d38314e Rework usage of Choice options 2020-12-14 15:25:36 +01:00
Dmitriy Dolovov 2953fb3970 Fix lost nullability in C-interop type aliases
^KT-43427
2020-11-28 21:07:01 +01:00
Stanislav Erokhin f624800b84 Move everything under kotlin-native folder
I was forced to manually do update the following files, because otherwise
they would be ignored according .gitignore settings. Probably they
should be deleted from repo.

Interop/.idea/compiler.xml
Interop/.idea/gradle.xml
Interop/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_runtime_1_0_3.xml
Interop/.idea/libraries/Gradle__org_jetbrains_kotlin_kotlin_stdlib_1_0_3.xml
Interop/.idea/modules.xml
Interop/.idea/modules/Indexer/Indexer.iml
Interop/.idea/modules/Runtime/Runtime.iml
Interop/.idea/modules/StubGenerator/StubGenerator.iml
backend.native/backend.native.iml
backend.native/bc.frontend/bc.frontend.iml
backend.native/cli.bc/cli.bc.iml
backend.native/cli.bc/src/org/jetbrains/kotlin/cli/bc/K2Native.kt
backend.native/cli.bc/src/org/jetbrains/kotlin/cli/bc/K2NativeCompilerArguments.kt
backend.native/tests/link/lib/foo.kt
backend.native/tests/link/lib/foo2.kt
backend.native/tests/teamcity-test.property
2020-10-27 21:00:28 +03:00