Commit Graph

103 Commits

Author SHA1 Message Date
Artem Daugel-Dauge 9e7e44e58f [Native] Add comments for the Xcode 15.3 workaround
^KT-65542
2024-03-11 13:25:40 +00:00
Dmitriy Dolovov 4e5a36de18 [KLIB] Mark DFG serialization code as unused and planned for removal
^KT-66218
2024-02-29 16:44:45 +00:00
Dmitriy Dolovov 05628660ba [Test] Implement classic & Fir Native KLIB facades for test infra
With these test facades it would be possible to serialize Native
test modules to KLIBs.

^KT-65117
2024-02-29 16:44:45 +00:00
Timofey Solonin 55e61f6631 [Native] Support Xcode 15.3 — add back the TargetConditional.h macros
^KT-65542
2024-02-28 16:38:37 +00:00
Artem Daugel-Dauge fff5a412ec [Gradle] Xcode version too high warning
Adds new warning diagnostic that checks that selected Xcode version is not higher than latest tested with the current Kotlin version

^KT-62373 Verification Pending
2024-02-27 13:23:55 +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
Alexander Shabalin edf8dc0421 [K/N] Add xcodeOverride to Xcode in native-utils ^KTI-1553
- findCurrent() is used by the build of Kotlin/Native compiler itself.
  It happens indirectly, via AppleConfigurables.
- CurrentXcode invokes xcrun command line tool in its implementation.
- Configuration cache prohibits calling external commands

All three factors combined make K/N compiler build incompatible with CC.

By using xcodeOverride, K/N compiler build can provide its own Xcode
instance avoiding calling external commands when it's not allowed by CC.
2024-02-22 21:22:36 +00:00
Dmitrii Krasnov f525d03e67 [Gradle] Moved downloading konan dependencies from compiler to Gradle
^KT-65823 Fixed
2024-02-20 15:47:58 +00:00
Alexander Shabalin d04b3050c0 [K/N] Remove old workaround for osVersionMin on arm macOS 2024-01-23 11:14:38 +00:00
Andrey Yastrebov 4176c50107 KT-63592 Create setupLLDBScript task 2024-01-03 10:29:18 +00:00
Dmitriy Dolovov 1c285de55e [KLIB Resolver] Prettier KLIB resolver messages
- Make the messages that are reported by KLIB resolver prettier
- For those messages that affect the resolve process add
  prefix "KLIB resolver: "
- Don't log warning on duplicated libraries on the classpath. This
  does not make any sense.

^KT-63573
2023-12-18 13:03:40 +00:00
Dmitriy Dolovov 46081f968d [KLIB Resolver] Report KLIB resolver issues as compiler messages
The reason of this change is to make messages (especially warnings)
that are reported by the KLIB resolver become visible to the end user.
This can be achieved to forwarding such messages to the appropriate
compiler's components such as
`org.jetbrains.kotlin.cli.common.messages.MessageCollector` and
`org.jetbrains.kotlin.ir.util.IrMessageLogger`.

Also: The default `DummyLogger` should be used as minimal as possible.
Because it just forwards messages to the standard output (console)
where they can remain unattended. When the compiler is executed
from the Gradle plugin such messages appear only in DEBUG Gradle's log.

^KT-63573
2023-12-18 13:03:40 +00:00
Troels Bjerre Lund 6161f44d91 Remove needsProfileLibrary argument
Second phase of removing LLVM coverage. This had to wait until after the
bootstrap advance.


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


Merge-request: KOTLIN-MR-838
Merged-by: Alexander Shabalin <alexander.shabalin@jetbrains.com>
2023-12-15 16:44:12 +00:00
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