Commit Graph

3243 Commits

Author SHA1 Message Date
Alexander Shabalin ac6aad1f65 [K/N][tests] Do not run objcexport-header-generator in backend.native:tests ^KTI-1571 2024-02-27 12:24:36 +00:00
cristiangarcia e83d2e31d4 Fix CompileToBitcodePlugin onlyIf to make it CC compatible
Required for KTI-1553
2024-02-27 10:32:58 +00:00
Vyacheslav Gerasimov 8fd3166199 Build: Remove coroutines-core dependency from backend.native:tests
The dependency on kotlinx-coroutines-core seems redundant and always
overridden by another dependency.
2024-02-27 10:29:59 +00:00
Vyacheslav Gerasimov f924de5a2c Build: Remove unused dependencies on :kotlin-compiler project
#KTI-1598
2024-02-27 10:29:59 +00:00
Alexander Shabalin edf05b69ac [K/N][performance] Fix build 2024-02-26 18:06:44 +00:00
Alexander Shabalin b1f59e5f0d [K/N] Make NativeDependenciesDownloader compatible with CC ^KTI-1553 2024-02-26 14:53:23 +00:00
Artem Olkov dd9332d9e1 Add kotlin runtime modulemap for swift export as part of kotlin-native dist #KT-65673 fixed
Co-authored-by: Alexander Shabalin <alexander.shabalin@ashabalin.me>

Merge-request: KT-MR-14493
Merged-by: Artem Olkov <artem.olkov@jetbrains.com>
2024-02-26 12:51:57 +00:00
Abduqodiri Qurbonzoda 31aa71dd6a Promote Common String.toCharArray(destination) to stable #KT-65532 2024-02-26 10:48:29 +00:00
Ilya Gorbunov 85854a6b8d [stdlib] Make enumEntriesIntrinsic not reified/inline
It's required to simplify the corresponding backends' inliners.

KT-59712, KT-59713
2024-02-23 05:50:37 +00:00
Dmitriy Dolovov 5e81850bb1 [KLIB tool] Don't sort declarations in "dump-metadata" command
Instead, let the command print declarations in the program order.
Do sorting only in special "test mode".

^KT-62340
2024-02-22 22:21:30 +00:00
Alexander Shabalin c600b74459 [K/N][tests] Restore ir_providers/hello.kt ^KTI-1597 2024-02-22 14:56:13 +00:00
Alexander Shabalin dc4f12f29c Revert "[K/N][Tests] Migrate driver test llvm_variant_dev"
This reverts commit d8a90f55a8.
2024-02-22 14:56:13 +00:00
Alexander Shabalin 4765cfda53 Revert "[K/N][Tests] Migrate test override_konan_properties0"
This reverts commit 9ef051dbc5.
2024-02-22 14:56:13 +00:00
Alexander Shabalin 8518c3f54f Revert "[K/N][Tests] Migrate test override_konan_properties0 and add testDriverVersion"
This reverts commit fbe8db4b45.
2024-02-22 14:56:13 +00:00
Yahor Berdnikau 6b19b8b9d0 [Repo] Don't use kotlinOptions in repo build scripts
^KT-63419 In Progress
2024-02-22 14:48:10 +00:00
Ivan Kylchik f1bc542d74 [IR] Change the return type of getFunctionDeclaration to be nullable
#KT-64807
2024-02-22 09:55:58 +00:00
Ilya Gorbunov 0ecbbbf1ca [stdlib] Set AV to 2.0, LV to 1.9 for main compilations, build tests with K2 2024-02-21 16:28:12 +00:00
Vladimir Sukharev bd7ffc71aa [K/N][Tests] Migrate test kt62262.kt
^KT-61259
2024-02-20 21:10:33 +00:00
Vladimir Sukharev 3d70be0c5f [K/N][Tests] Migrate test kt40426
^KT-61259
2024-02-20 18:56:54 +00:00
Dmitriy Dolovov 795ee9f26d [KLIB tool] "dump-metadata-signatures": exclude fake overrides
There are few reasons why fake overrides should not be printed:

1. Fake overrides are not serialized in metadata. So, if one will run
   "dump-metadata" they won't see there any fake overrides. Neither
   their signatures. It would be inconsistent if
   "dump-metadata-signatures" command would show them.

2. In order to properly build fake overrides the KLIB tool needs
   the dependency library with the super class or interface, which
   is not available unless this is stdlib or one of the built-in
   Kotlin/Native platform libraries. KLIB tool does not support any
   reasonable means for passing dependencies through CLI arguments.
   If such possibility is added in the future, it would be the
   right time to support printing fake overrides (probably under
   a separate CLI option).

^KT-62340
2024-02-20 11:52:26 +00:00
Dmitriy Dolovov f4f609bea7 [KLIB tool] "dump-metadata-signatures": exclude private declarations
Don't print signatures computed for private declarations. This
effectively means that only signatures for `public`, `protected`,
and `internal` declarations will be printed.

Note: This new behavior is intact with `dump-ir-signatures` command.

^KT-62340
2024-02-20 11:52:26 +00:00
Dmitriy Dolovov d18afff12b [KLIB tool] "dump-metadata-signatures" command: use stable sorted order
Print the signatures computed by the metadata always in stable sorted
order.

^KT-62340
2024-02-20 11:52:26 +00:00
Abduqodiri Qurbonzoda f6f04b209f [K/N] Remove deprecated setUnhandledExceptionHook(not-null) overload #KT-65532 2024-02-20 10:35:13 +00:00
Abduqodiri Qurbonzoda dd89efbce2 [K/N] Remove deprecated deinitRuntimeIfNeeded #KT-65532 2024-02-20 10:35:13 +00:00
Johan Bay d50b02adaf [K/N] only include bodies inside inlines for headers
Also renames the "header klib serializaion" option to something
that hopefully slightly better reflects its meaning
^KT-65442
2024-02-20 08:03:08 +00:00
Johan Bay a2516548e4 [K/N] avoid overwriting header when output paths are equal
^KT-65442
2024-02-20 08:03:07 +00:00
Ilya Gorbunov 15375c0fd5 [stdlib] Use more idiomatic and performant implementation of isBlank
Also replace expect-actual with a common function because its implementation is no longer different in different platforms.

KT-65590
2024-02-20 03:48:08 +00:00
Ivan Kylchik b0171dea63 [IR] Move FunctionInlining into separate module
#KT-64806 Fixed
2024-02-19 20:14:16 +00:00
Ivan Kylchik 35b13775d8 [IR] Move declaration of origins for IR inliner into LoweredStatementOrigins
#KT-64806
2024-02-19 20:14:16 +00:00
Vladimir Sukharev 2b2c685827 [K/N][Tests] Migrate dylib-interop-exe tests
^KT-61259
2024-02-19 18:44:08 +00:00
Dmitriy Dolovov 215303606b [KLIB tool] Entry point for tests: org.jetbrains.kotlin.cli.klib.Main.exec
^KT-62340
2024-02-19 09:36:10 +00:00
Dmitriy Dolovov 16a27c2e05 [KLIB tool] Split KlibToolCommand into multiple individual commands
^KT-62340
2024-02-19 09:36:10 +00:00
Dmitriy Dolovov 358ad272f4 [KLIB tool] Extract class KlibToolCommand from main.kt
^KT-62340
2024-02-19 09:36:10 +00:00
Dmitriy Dolovov 9878c1fa16 [KLIB tool] Introduce KlibToolOutput for capturing stdout and errors/warnings
With `KlibToolOutput` it's possible to forward the output of each
KLIB tool's command to either system stdout/stderr streams or to
some buffers which then can be read by tests.

^KT-62340
2024-02-19 09:36:10 +00:00
Dmitriy Dolovov 5b7c11ae39 [KLIB tool] Introduce a '-test-mode' CLI option
This is an option that allows running the commands that support it
in a special "test mode". The "test mode" means (but not limited to)
that a command may, for example, sort the output which is unsorted
by default, and this way guarantee stable output. This is essentially
helpful for tests, which rely on the command output.

^KT-62340
2024-02-19 09:36:10 +00:00
Dmitriy Dolovov 82115c1f26 [KLIB tool] Drop unused blind flag in "remove" command
^KT-62340
2024-02-19 09:36:10 +00:00
Dmitriy Dolovov 77b574bd0d [KLIB tool] Rename class Library -> class KlibToolCommand
Also, make it use `KlibToolArguments` instead of separate isolated
arguments passed via constructor or via individual command calls.

^KT-62340
2024-02-19 09:36:10 +00:00
Dmitriy Dolovov 7aa106c3a0 [KLIB tool] Extract self-sufficient classes from main.kt to separate files
Classes extracted:
- KlibToolArguments
- KlibToolArgumentsParser
- KlibToolLogger
- KlibToolIrLinker

^KT-62340
2024-02-19 09:36:10 +00:00
Dmitriy Dolovov 4fe8885376 [KLIB tool] Split KlibToolArguments to arguments & arguments parser
^KT-62340
2024-02-19 09:36:10 +00:00
Dmitriy Dolovov 02ab472f0b [KLIB tool] Rename: class Command -> class KlibToolArguments
This way it would better reflect its purpose.

^KT-62340
2024-02-19 09:36:10 +00:00
Dmitriy Dolovov 921a787815 [KLIB tool] Move all CLI-related logic to the Command class
^KT-62340
2024-02-19 09:36:10 +00:00
Dmitriy Dolovov d4585ff3ce [KLIB tool] Refactoring. Fix visibility, add comments, drop useless code
What's done:
- Reduce the visibility of all entities inside the module to `internal`
  or `private`. Only leave `fun main()` as `public` because it's the
  single legal entry point.
- Add comments to few classes related to "contents" command that they
  should be removed together with the command after 2.0.
- Drop useless `DeclarationHeaderRenderer` interface.
- Rename: KlibToolLinker -> KlibToolIrLinker

^KT-62340
2024-02-19 09:36:10 +00:00
Mark Mann 00ef313df2 [K/N] Add binary option to produce error on mangled objc names (#5264)
objcExportErrorOnNameCollisions=true binary option makes the compiler
emit an error whenever it mangles a name emitted by ObjCExport.

^KT-65863 Fixed
2024-02-16 18:17:30 +00:00
Leonid Startsev a6cdf27204 Fix compilation of :tools:kotlinp-klib and related projects
Conflicting PRs https://jetbrains.team/p/kt/reviews/14253 and https://jetbrains.team/p/kt/reviews/14384/files
were merged too close to each other for Safe-Merge to catch the problem and therefore resulted in compilation error.
2024-02-15 17:15:58 +00:00
Dmitriy Dolovov f9f97f2050 [KLIB tool] Support metadata format by kotlinp
Use the unified metadata printing format in KLIB tool. The same format
is already used in `kotlinp` CLI tool.

^KT-62340
2024-02-15 15:38:27 +00:00
Leonid Startsev 09e89db82f Change kotlinx- to kotlin- in kotlin-metadata-jvm and related projects
Change package, artifact group, artifact name, and Gradle module name to
kotlin-metadata and kotlin-metadata-jvm, respectively.

In Kotlin 2.0, kotlin-metadata-jvm library is promoted to stable, and is
a part of Kotlin distribution now.

Note that kotlinx-metadata-klib is left with org.jetbrains.kotlinx group, artifact name and package
because -klib part is considered not stable and for internal use. Since it is still published via Sonatype,
it should have kotlinx group. Therefore, it will have both classes from kotlin.metadata and kotlinx.metadata packages. This is not a problem, because we already had kotlinx.metadata split package between -jvm and -klib before.

#KT-63219 Fixed
2024-02-15 15:32:33 +00:00
Vladimir Sukharev 20f6b0cb0c [K/N][Tests] Migrate test ir_providers_mismatch
^KT-61259
2024-02-15 10:13:56 +00:00
Vladimir Sukharev fbe8db4b45 [K/N][Tests] Migrate test override_konan_properties0 and add testDriverVersion
^KT-61259
2024-02-14 12:16:23 +00:00
Vladimir Sukharev 9ef051dbc5 [K/N][Tests] Migrate test override_konan_properties0
^KT-61259
2024-02-14 12:16:22 +00:00
Vladimir Sukharev d8a90f55a8 [K/N][Tests] Migrate driver test llvm_variant_dev
^KT-61259
2024-02-14 12:16:22 +00:00