Commit Graph

1545 Commits

Author SHA1 Message Date
Igor Chevdar 46f448b5d1 [K/N][tests] Fixed ObjC invalid identifiers test
Some identifiers will be invalid in Kotlin 1.7
2022-02-24 15:20:14 +03:00
Sergey Bogolepov 817f9f13b7 [K/N] Drop androidNativeActivity sample
This sample uses custom API that is not supported and documented.
Thus, it creates wrong impression on how to use Kotlin/Native for NDK.
2022-02-23 17:25:47 +00:00
Sergey Bogolepov 2ecde3e831 [K/N] Enable AndroidProgramType.Standalone by default
^KT-49144 fixed.
2022-02-23 17:25:47 +00:00
Nikolay Krasko a2cef5c930 Update shadow plugin to 7.1.2
^KTI-728 Fixed
2022-02-22 21:43:27 +03:00
Ilya Goncharov 637d45c539 [IR] Disable rename of inline symbols
Merge-request: KT-MR-5801
Merged-by: Ilya Goncharov <Ilya.Goncharov@jetbrains.com>
2022-02-22 15:59:02 +00:00
Sergey Bogolepov f010c33958 [K/N] Fix compilation of static libraries for Android
^KT-49145 fixed
2022-02-22 15:37:41 +00:00
Alexander Shabalin 964edbaf91 [K/N] Reuse mark queue ^KT-51436
Merge-request: KT-MR-5819
Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>
2022-02-22 11:01:15 +00:00
Dmitriy Novozhilov 3d48f9926f [Build] Update version of kotlin-build-gradle-plugin to 0.0.35 2022-02-18 17:44:44 +03:00
Sergey Bogolepov 50cc4f301d [K/N] Manually add the rest of hosts to the dependency in KT-51302 2022-02-17 11:12:58 +00:00
Sergey Bogolepov a22dcc0f14 [K/N] Test case for KT-51302
There is no infrastructure for testing klib ABI compatibility yet.
As a workaround, we store klib directly in repo.
2022-02-17 11:12:57 +00:00
Svyatoslav Scherbina 1fdb86d517 Native: fix loading libllvmstubs.dylib on macOS 12.3 Beta
Link libllvmstubs.dylib to `$sysroot/usr/lib/libc++.1.dylib`
instead of `$llvm/lib/libc++.1.dylib`.
The latter has `@rpath/libc++.1.dylib` as install name, so
the dynamic linker was unable to find it when loading
libllvmstubs.dylib on macOS 12.3.

^KT-51359 Fixed
2022-02-17 11:07:26 +00:00
Pavel Kirpichenkov 6674c3f482 [MPP] Apply @UnsafeNumber to functions and properties
KT-51224
KT-51215
2022-02-17 13:17:13 +03:00
Pavel Kirpichenkov f8a1395a03 [MPP] allow function and property targets for @UnsafeNumber annotation
KT-51224
KT-51215
2022-02-17 13:17:13 +03:00
Dmitriy Dolovov 56510fbc6c [Native][tests] Dump the list of all available tests during compilation
^KT-50316
2022-02-17 12:45:37 +03:00
Elena Lepilkina 703aea1362 [K/N] Added Mac OS X (Arm64) target support on performance server 2022-02-17 09:43:43 +00:00
Elena Lepilkina 76220ebf43 [K/N][perf] Fix videoplayer compile only benchmark for mac_arm64 2022-02-17 09:43:43 +00:00
Elena Lepilkina bee188dc8b [K/N][perf] Turn on cinterop commonization 2022-02-17 09:43:43 +00:00
Elena Lepilkina 015920257f [K/N][perf] Adopt benchmarks plugins and tools to support both macosX64 and macosArm64 2022-02-17 09:43:42 +00:00
Elena Lepilkina b9a1b3c4df [K/N][perf] Support framework benchmark on macosArm64 2022-02-17 09:43:42 +00:00
Elena Lepilkina f67656aeba [K/N][perf] Added macosArm64 target to benchmarksAnalyzer 2022-02-17 09:43:42 +00:00
Svyatoslav Scherbina 0c6421d53f Native: switch CLI compiler and tools to embeddable compiler jar
To keep it consistent with Gradle plugin. See ^KT-48595
CLI compiler launched with arguments obtained from Gradle log
should be able to handle plugins.
2022-02-15 14:35:07 +00:00
Sergey Bogolepov 52c8b6166c [K/N] Fix filecheck_function_attributes_at_callsite test 2022-02-14 13:38:51 +00:00
Sergey Bogolepov fbbe5cbd03 [K/N] Disable filecheck tests in some cases 2022-02-14 13:38:50 +00:00
Sergey Bogolepov b4cbe703cd [K/N] Test for KT-50970 2022-02-14 13:38:50 +00:00
Sergey Bogolepov ad793ac624 [K/N] Support cross targets in FileCheckTest
Also mark property's getter with Input and Optional annotations instead of
property itself.
2022-02-14 13:38:49 +00:00
Sergey Bogolepov 34cb79fc9f [K/N] Fix KT-50970
Force generation of ARM instruction set for iosArm32 and
watchosArm32 targets for C++ code. There is no need for such
adjustments for Kotlin code because we don't specify any target
features in IrToBitcode and compiler backend infers target features
from target architecture (which is armv7* and not thumbv7).
2022-02-14 13:38:49 +00:00
Pavel Punegov 423e5a6530 [K/N][build] Rewrite endorsed libraries build to kts 2022-02-14 15:58:39 +03:00
Pavel Punegov 361d922119 [K/N][build] Rewrite kotlinx.cli build to kts
Rewrite to kts and use konan plugin instead of simple JavaExec task.
Produce cache in the project instead of the upper one.
2022-02-14 15:58:38 +03:00
Dmitriy Dolovov f62dcf65fc [Native][tests] Fix generation of *.def file in accidentally disappeared dir 2022-02-14 13:41:00 +03:00
Dmitriy Dolovov 334dffd3e4 [Native][tests] Remove external tests from old test infra 2022-02-14 13:41:00 +03:00
Svyatoslav Scherbina 5afbbecea4 Native: rename Xcode.current to .findCurrent()
To reflect that it is a non-trivial operation with possible performance
overhead.
2022-02-14 08:52:14 +00:00
Svyatoslav Scherbina e92f7b5ec3 Native: don't cache Xcode.current between different compiler invocations
The compiler might be executed in a Gradle daemon process,
so current Xcode might actually change between different invocations.

^KT-49496 Fixed
2022-02-14 08:52:13 +00:00
Svyatoslav Scherbina 86ad804848 Native: remove support for pre-Xcode 12 libclang_rt
Kotlin/Native doesn't support Xcode versions older than 12.5 anymore,
so just remove the obsolete code.
2022-02-14 08:52:13 +00:00
Pavel Kunyavskiy b575d98272 [K/N] Eliminate frame creation in some cases 2022-02-11 13:52:07 +00:00
Svyatoslav Scherbina d8b1992fde Native: fix cinterop for Swift-produced Objective-C categories
For some reason, libclang's indexer doesn't index categories with
__attribute__((external_source_symbol(language="Swift",...))),
so we have to additionally enumerate them explicitly.

^KT-49455 Fixed
2022-02-11 12:45:39 +00:00
Svyatoslav Scherbina ad72545647 ObjCExport: deprecate exporting data class componentN methods to Obj-C
The Objective-C methods for Kotlin data class componentN methods
shouldn't have been generated in the first place -- the corresponding
Kotlin methods are required to make the destructuring work in Kotlin,
and don't help in Objective-C or Swift.

Calling them manually from Objective-C or Swift doesn't make much sense.
So now we deprecate this, in order to remove these methods from
Objective-C header completely later.

^KT-42641
^KT-49516 Fixed
2022-02-11 06:55:47 +00:00
Pavel Punegov 4f981ff745 [K/N] Use toBits() in Float and Double hashCode()
toBits() is aware of NaNs comparing to bits()
2022-02-10 16:25:18 +00:00
Sergey Bogolepov f7cc23a13b [K/N] Mention test_compile_only in HACKING.md 2022-02-10 13:38:48 +00:00
Sergey Bogolepov 072acf688e [K/N] Support compile-only mode for legacy test infra 2022-02-10 13:38:48 +00:00
Svyatoslav Scherbina 62c1bd0044 Native: fix using nested expect enum entry in a default argument
^KT-51156 Fixed
2022-02-09 14:41:11 +00:00
Svyatoslav Scherbina eb78f5e1ca Native: make xcrun failures a bit more useful again
^KT-50923
2022-02-09 12:46:19 +00:00
Svyatoslav Scherbina 76672a4abf Native: terminate if cinterop ObjC reference conversion throws exception
To avoid forwarding Obj-C exceptions to Kotlin or vice versa.
Otherwise this might lead to a crash or other undesirable behaviour.

^KT-50648 Fixed
2022-02-09 07:47:42 +00:00
Svyatoslav Scherbina d235fc4dbe Native: add thread state switches to blockToKotlinImp 2022-02-09 07:47:42 +00:00
Svyatoslav Scherbina 925e7801aa Native: improve message when Obj-C block can't be converted to Any 2022-02-09 07:47:41 +00:00
Svyatoslav Scherbina cd62b5b3b3 ObjCExport: optimize receiving autoreleased references from Obj-C/Swift
when the callee supports this.
2022-02-08 15:17:06 +00:00
Svyatoslav Scherbina 874cc6c51c Native: add LLVMSetNoTailCall to LLVM C API 2022-02-08 15:17:05 +00:00
Svyatoslav Scherbina 085e2448cd ObjCExport: don't use autorelease when sending arguments to Swift/Obj-C 2022-02-08 15:17:04 +00:00
Svyatoslav Scherbina 9326978327 ObjCExport: fix noAutorelease tests for the new MM 2022-02-08 15:17:04 +00:00
Svyatoslav Scherbina d161108be3 ObjCExport: fix noAutorelease/testReceiveBlockFromSwiftAndCall
The test expects to track block result lifetime in Swift, so we should
add it to the tracker.

Also fix the same problem for testReceiveBlockFromKotlinAndCall
(which didn't fail because we added the block itself to the tracker).
2022-02-08 15:17:04 +00:00
Igor Yakovlev 195513d4f2 [WASM] Workaround about call toTypedArray on AbstractCollection 2022-02-03 21:25:58 +01:00