Commit Graph

2894 Commits

Author SHA1 Message Date
Dmitriy Novozhilov 704e2ef5c5 Suppress K2 specific warnings in the codebase
^KT-62472
2023-10-18 07:59:27 +00:00
Alexander Shabalin 83435ccde1 [K/N] Remove workaround in FrameworkTest for old macOS
In macOS prior to 10.14.4 we needed to specify the location of
libswiftCore.dylib. That OS version is long unsupported, so we can
drop the code.
2023-10-17 16:54:34 +00:00
Alexander Shabalin 004ef267c5 [K/N] Remove check for bitcode embedding ^KT-61875
This removes the check in old testing infra for FrameworkTest.
2023-10-17 16:54:34 +00:00
Alexander Shabalin 27c85a059f [K/N] Move memmem from Porting.h to KString.cpp ^KT-59008 2023-10-17 09:37:34 +00:00
Ivan Kylchik 350ee4be1d [Native] Replace consequence line and column calls with a single one 2023-10-13 08:50:47 +00:00
Pavel Kunyavskiy 156c341eeb [K/N] Implement objc overridablity condition for IR
^KT-61511
2023-10-13 08:15:01 +00:00
Svyatoslav Scherbina a318cd455d Native: fix interop_concurrentRuntime test for mingw_x64
Our sysroot for mingw_x64 still requires -femulated-tls. For C++ code
as well. Without it the test fails with

    lld-link: error: undefined symbol: std::__once_call

^KT-46612
2023-10-12 17:16:18 +00:00
Svyatoslav Scherbina 080a404d9a Native: enable interop_concurrentRuntime test since it no longer fails
^KT-43180 Obsolete
2023-10-12 17:16:18 +00:00
Svyatoslav Scherbina 2db89b7e7a Native: improve description of supported MSVC versions in README 2023-10-12 17:06:56 +00:00
Igor Chevdar 6c519488a6 [IR] Reworked K/N variables inliner hint 2023-10-11 06:27:02 +00:00
Dave MacLachlan c820e82db3 Native: remove linker warning when building libllvmstubs
Building with macOS gave the linker warning
`ld: warning: ignoring duplicate libraries: '/Users/foo/.konan/dependencies/apple-llvm-20200714-macos-aarch64-1/lib/libclangEdit.a'`

Remove duplication from the build script to get rid of the warning.

Co-authored-by: Dave MacLachlan <dmaclach@gmail.com>
2023-10-09 16:49:16 +00:00
Pavel Kunyavskiy a561a8e531 [K/N] Improve the exception message in code generator exceptions
^KT-62335
2023-10-06 11:39:03 +00:00
Vladimir Sukharev e342d7ff66 [K/N] Revert language version override for uikit sample
^KT-62262
2023-10-05 14:37:13 +00:00
Vladimir Sukharev 520983d52c [K/N] Add failing test for KT-62262: NPE compiling uikit sample
^KT-62262
2023-10-05 14:37:13 +00:00
Troels Bjerre Lund f2fb237212 [K/N] Lower amount of finalization in stress test 2023-10-05 13:18:20 +00:00
Troels Bjerre Lund 239f3a30cb [K/N] Add flag to disable allocator overhead estimate 2023-10-05 13:18:20 +00:00
Troels Bjerre Lund 3ae7b790a9 [K/N] Update HeapTest
This adds TypeInfo to the objects allocated in HeapTest, which is now
needed by SweepObject to gather problem live set statistics.
2023-10-05 13:18:20 +00:00
Alexander Shabalin 2a41b80373 [K/N] Make stress_gc_allocations tests more useful ^KT-61914 2023-10-05 13:18:20 +00:00
Troels Bjerre Lund bb195749c8 [K/N] Re-enable mutator assist
Also remove disabling of GC scheduling during GC
2023-10-05 13:18:20 +00:00
Troels Bjerre Lund a752d5d000 [K/N] Estimate allocator overhead
This increases the boundary for the next GC scheduling by how much is
estimated is currently being wasted by the allocator due to paging. This
is necessary, since the gc scheduling boundary is set based on the size
of the live set at the last GC, while the current memory use is only
tracked in whole allocator pages. This patch avoids some of the
situations where the GC would be triggered again immediately upon
completion, which happens with many sparsely filled pages.
2023-10-05 13:18:20 +00:00
Troels Bjerre Lund fc13dbdb91 [K/N] Track live size on sweep
After the change to track allocations in big chunks (KT-57773), the
scheduler no longer had information about how much of the allocated
memory was used on live objects, which lead to a lot of extra memory
usage (KT-61914). This patch adds the tracking of live objects size to
sweeping, which is enough to mitigate the problem.

co-authored by Alexander Shabalin

^KT-61914
2023-10-05 13:18:20 +00:00
Svyatoslav Scherbina e22d9821e2 Native: fix kotlin-native/performance/framework build script for K2
The build script manually specifies which directories are parts of
which source sets. And it did that wrong: all directories were just
added to the nativeMain source set.
This was an incorrect configuration (matching expect and actual were
getting into the same source set), and K2 compiler was not really happy
with that.

This commit fixes the correspondence between source sets and source
directories in kotlin-native/performance/framework build script, thus
fixes the build for that benchmark with K2.
2023-10-05 09:17:58 +00:00
Svyatoslav Scherbina 4672727bd6 Native: enable K2 for benchmarks in performance/
Those benchmarks are built with bootstrap KGP and snapshot compiler.
Currently the former is K1, while the latter is K2. As a result, the
build fails because K2 compiler needs -Xfragment-sources argument,
while K1 uses -Xcommon-sources. So KGP passes the latter, while the
compiler expects the former.

Fix this by forcing KGP to use K2 for benchmarks in performance/
This can be reverted once bootstrap is updated to 2.0.0.
2023-10-05 09:17:58 +00:00
Vladimir Sukharev cd4c241fa3 [K/N] Run irText tests for K2/Native
^KT-58240
2023-10-04 18:20:05 +00:00
vishwajeet.barve 28fabf06fc Native: update README to reflect that build time depends on system configuration (#5189)
Co-authored-by: vishwajeet.barve <vishtech36@gmail.com>
2023-10-04 14:59:54 +00:00
Timofey Solonin 8dc9307f9e Add iconv void * overloads for backwards compatibility
Since Xcode 15 the iconv APIs operate on an opaque type __tag_iconv_t* instead of
void*. This causes a runtime exception in older Ktor versions which
depended on iconv.

^KT-62286
2023-10-04 08:04:37 +02:00
Svyatoslav Scherbina 5be76eb57c Native: disable K2 for tests/samples/uikit
Currently it fails with K2 because of ^KT-62262
Disable K2 in this test in order to mute the failure.
2023-10-03 14:53:58 +00:00
Svyatoslav Scherbina 096edd8937 Native: enable K2 for benchmarksAnalyzer
benchmarksAnalyzer is built with bootstrap KGP and snapshot compiler.
Currently the former is K1, while the latter is K2. As a result, the
build fails because K2 compiler needs -Xfragment-sources argument,
while K1 uses -Xcommon-sources. So KGP passes the latter, while the
compiler expects the former.

Fix this by forcing KGP to use K2 for benchmarksAnalyzer.
2023-10-03 14:53:58 +00:00
Dmitriy Dolovov 4d80e0f08d [Native] Respect local.properties in build config 2023-10-02 16:14:59 +00:00
Timofey Solonin f3bc8677c5 Increase execution timeout due to slower Rosetta agents
^KT-61369
2023-10-02 10:13:57 +00:00
Timofey Solonin 7973d898d2 Remove __clear_cache builtin and SparseGetInertia from the targets where
these functions are unlinkable

^KT-61369
2023-10-02 10:13:57 +00:00
Timofey Solonin 35de28d1aa Make NSBezierPathElement an enum
and move NSImage and NSProgessIndicator APIs from categories back to the types

^KT-61369
2023-10-02 10:13:57 +00:00
Timofey Solonin e7dbb9c9a8 Return APIs hidden by __CCT_ENABLE_USER_SPACE
^KT-61369
2023-10-02 10:13:56 +00:00
Timofey Solonin 33a4958c4c Move CloudKit changes from a category to the type
^KT-61369
2023-10-02 10:13:56 +00:00
Timofey Solonin 94f86d6ef9 Update def files for Xcode 15
^KT-61369
2023-10-02 10:13:56 +00:00
Timofey Solonin 622dba2ad5 Update Xcode to 15 RC
^KT-61369
2023-10-02 10:13:56 +00:00
Timofey Solonin 5e1031d98f Adhoc codesign explicitly for arm64 tvos simulator
due to Xcode 15's new linker not codesigning. Without signing binaries
are not runnable on arm64 macOS.

^KT-62086
2023-10-02 09:52:44 +00:00
Pavel Kunyavskiy 2b8b6a2b21 [IR] Split FakeOverrideBuilder to two parts
Now there is separate class encapsulating logic about how to build
fakeOverrides and one encapsulating logic of which classes
do need building fake overrides.

This also allows to untie strange inheritance dependencies.

^KT-61934
2023-09-24 16:11:49 +00:00
Johan Bay 9399663b6e [K/N] Serialize full IdSignatures to caches
^KT-61642 Fixed
2023-09-22 22:30:25 +00:00
Vladimir Sukharev 690d18e541 [K/N, Test] Move test code "org.jetbrains.kotlin.konan" -> "org.jetbrains.kotlin.konan.test.*" 2023-09-22 17:27:09 +00:00
Dmitriy Dolovov fa34021a04 [Native][tests] Fix KLIB contents tests 2023-09-22 05:56:22 +00:00
Bogdan Mukvich d4640cb576 Remove repack_bundles.py script
* moved to build infrastructure scripts
2023-09-21 10:24:09 +00:00
Dmitriy Dolovov 38a67f3d30 [KLIB] Use -Xmetadata-klib to produce metadata KLIBs
With this change a new `-Xmetadata-klib` CLI flag becomes the
preferable way to instruct K2MetadataCompiler to produce metadata
KLIBs. The old `-Xexpect-actual-linker` flag still works for
K2MetadataCompiler, but that would last just for a short transition
period until the necessary changes are made in the Gradle plugin.

The K2NativeCompiler does not work anymore with `-Xexpect-actual-linker`
and respects only the `-Xmetadata-klib` flag. This is not an
issue since the Gradle plugin anyway supplies both flags for Native
metadata compilations.

^KT-61136
2023-09-20 22:26:36 +00:00
Dmitriy Dolovov 848c88b1a5 [KLIB] Lift up -Xmetadata-klib CLI key from Native to Common args
This is a precondition for obsoleting and finally removing
`-Xexpect-actual-linker` CLI key, which became useless since
the removal of ExpectActualTable.

^KT-61136
2023-09-20 22:26:36 +00:00
Ilya Chernikov e5ee364419 IC: Implement expect/actual tracking
fixes NewMultiplatformIT.testIncrementalCompilation
also #KT-61590 fixed
2023-09-19 15:46:30 +00:00
Mikhail Glukhikh fc2041e5b9 LV 2.0: allow unstable dependencies in kotlin-native/build-tools
Without this commit, build of this module fails during bootstrap
with FIR_COMPILED_CLASS
2023-09-19 15:46:29 +00:00
Konstantin Tskhovrebov 4ad5be35f4 KT-56369: [cinterop] Throw an error for an unexpected module imports
Module imports require explicit '-fmodules' compiler flag.
If the indexer meets a module import but there is no the flag
then it throws an error.
2023-09-19 15:23:52 +00:00
Pavel Kunyavskiy 71128e232e [K/N] Avoid creating fake overrides before setting class parent
This fixes a tests crash introduced in #KT-61366 fix.
2023-09-19 12:04:05 +00:00
Pavel Kunyavskiy aef5290210 [K/N] Change test to make aggregate green.
The test is using error suppressing, so breaking it is fine.


^KT-62015
2023-09-18 20:02:36 +00:00
Igor Chevdar 2b8bcfda94 [K/N][codegen] Build trampolines for abstract fake overrides
#KT-61924 Fixed
2023-09-15 09:26:54 +00:00