Commit Graph

1504 Commits

Author SHA1 Message Date
Vyacheslav Gerasimov 5e09c3176f Build: Set kotlin.build.cache.push to false by default
#KTI-793
2022-03-13 20:29:12 +00:00
Svyatoslav Scherbina 54fb4d9b70 Native: make forward declarations expect in metadata compilations
If we are compiling metadata, make synthetic forward declarations
`expect`, because otherwise `getFirstClassifierDiscriminateHeaders`
would prefer it over a "real" `expect` declaration from a commonized
interop library, which would ruin the whole idea of using synthetic
forward declarations only when no proper definitions are found.

^KT-51377 Fixed
2022-03-11 15:09:38 +00:00
Pavel Kunyavskiy 42a2ce1610 [K/N] Fix currentFrame in smaller scope, to avoid gc while having incorrect shadow stack 2022-03-10 13:22:04 +00:00
dependabot[bot] 872bda01e0 Bump node-fetch in /kotlin-native/tools/performance-server
Bumps [node-fetch](https://github.com/node-fetch/node-fetch) from 2.6.1 to 2.6.7.
- [Release notes](https://github.com/node-fetch/node-fetch/releases)
- [Commits](https://github.com/node-fetch/node-fetch/compare/v2.6.1...v2.6.7)

---
updated-dependencies:
- dependency-name: node-fetch
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-09 14:30:08 +03:00
Svyatoslav Scherbina 63a396b51d Native: fix classpath in KonanCliRunner
It included "konan/lib/*.jar", which became incorrect after adding
kotlin-native-compiler-embeddable.jar to K/N dist in 2baf344f5f:
after that, the classpath included both kotlin-native.jar and
kotlin-native-compiler-embeddable.jar, so it contained duplicating
classes.

Fix this by choosing particular .jar files from konan/lib, and use
kotlin-native-compiler-embeddable.jar.
2022-03-09 11:09:25 +00:00
Svyatoslav Scherbina 5a1513ad59 Native build: make distCompiler no-op when using custom dist
Custom dist is already in place and has the compiler, so we don't have
to build and copy the compiler to dist.

Moreover, if we do copy it, it might overwrite the compiler files
already loaded by this Gradle process (including the jar loaded to the
custom classloader), causing hard-to-debug errors.

To workaround this, we disable the distCompiler task and don't add any
dependencies to it when custom dist is used.
2022-03-06 12:17:06 +00:00
Svyatoslav Scherbina 7470aaf06c Native build: don't read klib files in KonanCacheTask.cacheFile
It is `@OutputDirectory`, so Gradle can invoke it early, even before the
klib itself is built.

Instead of reading `uniqName` from klib files, require specifying it
explicitly.
2022-03-06 12:16:17 +00:00
Pavel Kunyavskiy dae24ff6d1 [K/N] Support IrDefinitelyNotNullType in type erasure 2022-03-01 08:03:28 +00:00
Nikolay Krasko 0b4aea4103 Fix exhaustive when error in :ring:compileKotlinNative 2022-03-01 02:28:52 +03:00
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