Commit Graph

90 Commits

Author SHA1 Message Date
Pavel Punegov 2d2714c8de [K/N] Move runtime bitcode files out of stdlib
Native bitcode files were moved out of the stdlib to the default
location of bitcode files in the dist.
Now it is possible to build stdlib separately and once as a klib
without bitcode files inside.
2023-12-14 11:33:20 +00:00
Troels Bjerre Lund 4f77434ea5 [K/N] Remove LLVM coverage
The -Xcoverage feature has not worked and has been disabled for a while.
This fix removes it, and all of its uses.


Co-authored-by: Troels Lund <troels@google.com>


Merge-request: KOTLIN-MR-821
Merged-by: Alexander Shabalin <alexander.shabalin@jetbrains.com>
2023-12-06 14:07:16 +00:00
Johan Bay 3aeca1956e [K/N] Consolidate toolchain paths between platforms
The compiler had some code that looked for the same tools and files
in toolchains at different relative paths depending on the platform.

This commit improves that code by including `usr/` into the path to
the toolchain on macOS, which allows to unify the relative paths
inside the toolchains.

Co-authored-by: Johan Bay <jobay@google.com>
2023-11-07 12:10:14 +00:00
Alexander Shabalin 4c36538646 [K/N] Add signposts to safepoints ^KT-62689
Disabled by default.

Merge-request: KT-MR-12679
Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>
2023-11-06 23:10:08 +00:00
Dmitrii Krasnov aad19ab844 [Gradle, Native] Override equals and hashCode in KonanTarget
"data objects" is only available since language version 1.9. But we should not use LV 1.9, because it is used in the Gradle build classpath and would be incompatible with Gradle Kotlin runtime.
Then only manually override equals/toString/ works here.

#KT-61657 Fixed


Merge-request: KT-MR-12759
Merged-by: Dmitrii Krasnov <Dmitrii.Krasnov@jetbrains.com>
2023-11-06 18:55:40 +00:00
Vladimir Sukharev aebbdeaf92 [K/N] Fix OS file handles leak in DependencyProcessor
Merge-request: KT-MR-12705
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-10-26 20:03: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
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
Alexander.Likhachev 6eaccc997f [Build] Fix the typo junit jupyter -> jupiter 2023-09-06 22:47:34 +00:00
Alexander.Likhachev 6f96be0b76 [Build] Get rid of the testApiJUnit5 method
#KTI-1349 In Progress
2023-09-06 22:47:34 +00:00
Alexander.Likhachev 357d12fc8e [Build] Move JUnit dependencies into the version catalog
The `kotlin-test` dependencies are left untouched as changing them affects publications, thus these versions are independent from the used inside our build
#KTI-1349 In Progress
2023-09-06 22:47:33 +00:00
Alexander Shabalin 958d613911 [K/N] Remove code for deprecated targets from runtime ^KT-59008 2023-09-01 10:48:07 +00:00
Dmitrii Krasnov ade88e2b0f Fixed konan.data.dir with caches
Removed TODOs after updating to kotlin bootstrap version with konan.data.dir gradle property changes

Fixed warning of incorrect passing -Xkonan-data-dir arg in konanc from KGP and fixed setting konan-data-dir in SetupConfiguration#setupCommonOptionsForCaches

#KT-60660 Fixed

Merge-request: KT-MR-11299
Merged-by: Dmitrii Krasnov <Dmitrii.Krasnov@jetbrains.com>
2023-08-22 07:56:26 +00:00
Sergey Bogolepov 9daa40d2ed [K/N] Use platform_version instead of sdk_version and os_version_min 2023-07-25 14:30:06 +00:00
Svyatoslav Scherbina 61dbe7fb75 [Gradle] temporarily change error to warning for linuxArm32Hfp
^KT-58864
2023-07-25 12:33:46 +00:00
Alexander Shabalin bdb534c3de [K/N] Fix perf build 2023-07-17 16:56:34 +00:00
Dmitrii Krasnov f2816a5531 Added property for overriding konan distribution location
#KT-50463 Fixed

Merge-request: KT-MR-10310
Merged-by: Dmitrii Krasnov <Dmitrii.Krasnov@jetbrains.com>
2023-07-12 12:36:51 +00:00
Sergey Bogolepov 0ceadc5933 [K/N] Fix KT-59167 2023-06-30 09:01:37 +00:00
Pavel Punegov 1ad0a662fd [K/N] XCTest support: Make compiler produce bundles
XCTest test binary is a bundle plug-in that is similar to a framework.
This is a part of ^KT-58928

Merge-request: KT-MR-10662
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
2023-06-22 13:23:17 +00:00
Artem Daugel-Dauge b6847d0835 [Gradle] Support configuration cache in Xcode/CocoaPods tasks with Gradle 8.1
This commit moves invocation of `xcodebuild` from configuration to execution time. This also fixes the problem with Xcode version being cached inside the daemon.

^KT-59252 Verification Pending
2023-06-21 13:31:38 +00:00
Vladimir Sukharev ebc4cf7f96 [K/N] Normalize klib paths for KonanLibraryImpl
^KT-58979 Fixed

Merge-request: KT-MR-10372
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-05-31 04:53:58 +00:00
Alexander Shabalin 1ef198ead4 [Gradle][MPP] Promote several K/N targets deprecation level to error 2023-05-26 14:47:45 +00:00
Alexander.Likhachev 44d9a2136b Bump language version for Gradle plugins' dependencies to 1.5
#KT-58569 Fixed
2023-05-12 12:59:39 +00:00
Gleb Lukianets 242ca73d83 rrn/rd/KT-55578 User-provided hints for linker errors
[K/N] KT-55578 Show customized user suggestions on linkage errors

Merge-request: KT-MR-9636
Merged-by: Gleb Lukianets <Gleb.Lukianets@jetbrains.com>
2023-04-27 14:14:43 +00:00
Sergey Bogolepov fb5b143c1d [K/N] Fix KT-57848 2023-04-10 09:59:29 +00:00
Pavel Punegov aed6272107 [K/N] Merge :kotlin-native-shared with :native:kotlin-native-utils
* Code was moved to utils, but sources are included to the shared
until bootstrap advance.
* Fixed dependencies and set API & LV to 1.4 for the modules used with
Gradle.

Merge-request: KT-MR-9122
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
2023-03-10 12:57:35 +00:00
Sergey Bogolepov de444542d0 [K/N] Make target deprecation warning more visible
Two columns in Gradle output makes IDE display such
message in a separate view which makes it more discoverable.
2023-02-08 09:31:30 +00:00
Sergey Bogolepov 6c449e29cd [K/N] Add a link for the target deprecation message 2023-02-02 08:24:02 +00:00
Sergey Bogolepov 955479752e [K/N] Mention deprecation in -list-targets flag 2023-01-18 16:17:13 +00:00
Stanislav Erokhin 37ab139139 [Gradle][MPP] Deprecate several K/N targets 2023-01-11 17:52:28 +00:00
Yahor Berdnikau b9aac83135 Add Kotlin Gradle plugins bom
This should help with failed variants selection between different Kotlin
 Gradle plugins versions.

 ^KT-54691 In Progress
2023-01-05 18:26:27 +00:00
Sergey Bogolepov 233b01f341 [K/N] CInterop ExceptionPrettifier
Add a wrapper around cinterop invocation that tracks exceptions.
Wrapper has a set of handlers. Each handler checks exception for some
pattern and if it matches, throws another exception with a more
user-friendly message.
The first such case is compilation error due to missing -fmodules flag.
2022-12-21 13:28:17 +00:00
Sergey Bogolepov 0b4a4ca42b [K/N] AArch64 watchOS target 2022-09-18 08:58:21 +00:00
Igor Chevdar 5c09d7838d [K/N] Added compiler interface to distribution 2022-09-06 14:03:41 +00:00
Nikita Bobko 2a4f3f41aa 2/5 Replace source dependency on kotlin-reflect with binary dependency
Review: https://jetbrains.team/p/kt/reviews/6753

Meaningful semantic change was splitted into 5 commits to simplify the
change review. Sinle commit would be too big.

Why replace source to binary: to get rid of kotlin-reflect in Kotlin
plugin artifact KTIJ-22276

Note: Kotlin Maven artifacts (./gradlew publish) changed their
dependency on kotlin-reflect
2022-08-22 15:43:49 +02:00
Nikita Bobko 8f79e833a8 Drop all redundant kotlin-reflect, kotlin-reflect-api dependencies
Review: https://jetbrains.team/p/kt/reviews/6753

All redundant I managed to find, of course.

Why: I'm going to process all reflect dependencies in the next commits.
Cleanup reflect dependency before processing.

They are redundant because:
1. if `compileOnly` then compilation didn't break after dropping the
   dependency
2. if `test*` then tests didn't break after dropping the dependency.
3. `analysis/analysis-api-fir/analysis-api-fir-generator/build.gradle.kts`
   `compiler/fir/checkers/checkers-component-generator/build.gradle.kts`
   Drop `implementation(project(":kotlin-reflect-api"))` because the
   module already depends on
   `implementation(project(":kotlin-reflect"))`
4. `compiler/daemon/daemon-client/build.gradle.kts`. Drop `runtimeOnly`
   because after dropping `compileOnly` compilation didn't break (so
   `runtimeOnly` looks suspicious). Less safe than 1-3
2022-08-22 15:42:57 +02:00
Igor Chevdar 5078d2eed8 [K/N] Added new output kind (will be used later)
PRELIMINARY_CACHE only builds additional (IR-based) info for a cache,
will be used later in per-file caches
2022-08-04 14:12:06 +00:00
Sergey Bogolepov f9d9dc58ff [K/N] Cross-compilation of MIPS targets from macOS and Windows hosts
Fixes KT-52226
2022-06-15 14:37:20 +00:00
Alexander Shabalin ed881f3f31 [K/N] Make PlatformManager serializable
Merge-request: KT-MR-6358
Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>
2022-05-30 15:52:08 +00:00
Sergey Bogolepov 2ecde3e831 [K/N] Enable AndroidProgramType.Standalone by default
^KT-49144 fixed.
2022-02-23 17:25:47 +00:00
Svyatoslav Scherbina 544447e67e Native: do not cache DependencyDirectories.localKonanDir
Caching is wrong when this code is running in Gradle daemon, because
the daemon can change the environment, while localKonanDir depends on
the environment.
2022-01-31 09:14:19 +00:00
Vyacheslav Gerasimov bc2f0936bd Build: Rename commonDep -> commonDependency 2021-12-16 21:48:19 +03:00
Sergey Bogolepov 708931b404 [K/N][Gradle] Use build service to read konan.properties
Also pass additionalCacheFlags when compiling compiler caches.
2021-09-27 11:21:25 +03:00
Sergey Bogolepov 479e7a5169 [K/N] Fix KT-48566 by falling back to the old behavior
In 1.5.20 HostManager.host started to check host architecture and it
leads to regressing in case of os+arch combination that is not supported
by HostManager.
Before 1.5.20 HostManager.host was determined only by OS. It is
not correct, but Gradle plugin uses HostManager even if there are
no Native targets. We fallback to this behavior to workaround this
regression.
2021-09-07 04:42:01 +00:00
Sergey Bogolepov 1315fdaf56 [K/N] Proper MinGW cross-compilation support 2021-08-23 16:01:36 +00:00
Mikhael Bogdanov 228100ef09 Upgrade toolchain to api/lv 1.4 2021-07-29 19:45:53 +02:00
Pavel Punegov 789799ac17 Revert simpleOsName in HostManager
Support old naming in simpleOsName.
Introduce new platformName method for the new archive naming.
2021-06-02 18:30:52 +03:00
Pavel Punegov 3293a888ca [native] Archive naming: use $os-$arch convention 2021-06-01 10:20:05 +00:00
Pavel Punegov 48ef739525 [native] Rename Apple MacOS targets in simpleOsName
Use Arm64 suffix for Apple Arm arch and X64 for Intel X86_64
2021-06-01 10:20:04 +00:00
Sergey Bogolepov b541721a79 Deprecate Architecture.bitness property
There is no such thing as "bitness" of CPU achitecture.
Something more appropriate and correct (e.g. ABI) should be
introduced instead.
2021-05-27 10:09:25 +03:00