103 Commits

Author SHA1 Message Date
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
Sergey Bogolepov 8df18c6395 [K/N] Update osVersionMin for arm ios and tvos simulators
While it was working before, it is not correct to use OS
version <= 13.0 for these targets, so let's make our code a bit more
robust.
2023-08-07 09:07:31 +00:00
Sergey Bogolepov 7e288483b3 [K/N] Update minimum iOS and tvOS versions
The new ld from Xcode 15 incorrectly parses a simulator
target version if it is below the minimum supported version.
It is unclear if this is intentional or not, but we have to play
by Apple's rules. Anyway, 9.0 is quite obsolete, so this change
should be pretty safe.

^KT-60758
2023-08-07 09:07:31 +00:00
Sergey Bogolepov c8a07ae156 [K/N] Keep osVersionMinFlagLd property for compatibility purposes.
Compiler build uses a bit older version of kotlin-native-shared which
still refers to an older property.
This commit should be reverted after compiler update.
2023-07-25 14:30:06 +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 39ef189e05 Native: change GCC toolchain for linux_arm32_hfp
^KT-58864
2023-07-21 16:13:26 +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 170c19d293 [K/N] Update SDK versions for iOS/watchOS/tvOS 2022-11-17 17:37:14 +00:00
Sergey Bogolepov 360046a33c [K/N] xcode 14.1 rc2 2022-11-17 17:37:13 +00:00
Sergey Bogolepov fc5ea570f0 [K/N] Bump macOS SDK version 2022-11-17 17:37:12 +00:00
Sergey Bogolepov 7830a68424 [K/N] Bump Xcode dependency to 14.1 RC 2022-11-17 17:37:12 +00:00
Sergey Bogolepov 0b4a4ca42b [K/N] AArch64 watchOS target 2022-09-18 08:58:21 +00:00
Sergey Bogolepov 183686659e [K/N] Bump Xcode SDK versions 2022-09-17 07:51:34 +03:00
Sergey Bogolepov 8bf7a17508 [K/N] Update Xcode version to 14-RC 2022-09-17 07:51:34 +03:00
Pavel Kunyavskiy de1dd47ab1 [K/N] Rework defines passing to runtime compilation 2022-08-17 08:32:47 +00:00
Alexander Shabalin d47193d36f [K/N] Add tracking of application state to the GC scheduler.
Merge-request: KT-MR-6435
Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>
2022-06-28 06:38:36 +00:00
Sergey Bogolepov 71f6c0b1b2 [K/N] Fix compilation of mips targets with the new MM
We have to link libatomic because the new MM (which is default)
requires intrinsics from this library.
2022-06-15 14:37:21 +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
Pavel Kunyavskiy 134647169e [K/N] add custom builtin_mul_overflow to workaround llvm bug
^KT-52365
2022-05-14 06:49:32 +00:00
Sergey Bogolepov 0b5b07f6e2 [K/N] Update MinGW dependencies
Include fixes for KT-50983 and KT-48558
2022-05-11 18:34:27 +00:00
Sergey Bogolepov a8fc2158d0 [K/N] Use toolchainDependency for Linux as well 2022-05-07 13:09:52 +00:00
Sergey Bogolepov db16acb788 [K/N] introduce toolchainDependency property for MinGW
Move all usages of `msys2-mingw-w64-*` dependency to a single
`toolchainDependency` property. It simplifies dependency overriding.
2022-05-07 13:09:51 +00:00
Sergey Bogolepov 5a0c3920a5 [K/N] Properly support watchosArm64 2022-04-27 14:46:35 +00:00
Sergey Bogolepov 77c04e7d71 [K/N] Do not inline runtime functions in case of armv7 darwin targets
^KT-51649 fixed
2022-03-21 09:11:13 +00:00
Sergey Bogolepov dfa6507cae [K/N] Bump Apple SDK versions 2021-12-01 08:49:51 +00:00
Sergey Bogolepov 9b06df48e4 [K/N] Update Xcode version to 13.1 2021-12-01 08:49:50 +00:00
Kirill Shmakov a582504bf1 [K/N][debug] Update LLDB bundle for Linux
This is related to KTIJ-19931
2021-11-15 10:39:11 +03:00
Mattia Iavarone 64a0d492b9 Fix Arm32 atomics 2021-10-25 22:31:15 +03:00
Sergey Bogolepov 6e2c35edf5 [K/N] Update list of optInCacheableTargets
Caches for iosArm64 and linuxX64 are promoted to stable since 1.6.0-M1.
2021-10-02 09:16:53 +00:00
Sergey Bogolepov b692705092 [K/N] Add LLVM utils into developer LLVM distribution.
Including FileCheck utility.
2021-10-01 14:18:01 +00:00
Pavel Kunyavskiy e15cfe8f70 [K/N] Use gradle-level conditional compilation for core symbolication 2021-09-29 07:00:07 +00:00
Sergey Bogolepov ae2c8a3540 [K/N] Fix KT-48613 2021-09-06 09:58:34 +00:00
Sergey Bogolepov 1381221ef8 [K/N] Use smaller mingw-w64-i686 toolchain as well 2021-08-23 16:01:36 +00:00
Sergey Bogolepov 1315fdaf56 [K/N] Proper MinGW cross-compilation support 2021-08-23 16:01:36 +00:00
Sergey Bogolepov 6953d29922 [K/N] Use smaller mingw-w64-x86_64 toolchain
We don't need LLVM components there anymore because they live in
a separate dependency now.
2021-08-23 16:01:35 +00:00
Sergey Bogolepov 8866ab5916 [K/N] Switch user LLVM distributions to smaller ones 2021-08-23 10:13:35 +00:00
Sergey Bogolepov 18bb287d3b [K/N] Switch from cyclone to apple-a7 for Apple AArch64
This change shouldn't affect behaviour, but rather makes bitcode a bit
more consistent with what Xcode generates.
2021-08-06 14:19:42 +00:00
Sergey Bogolepov d64cb24643 [K/N] Don't pass -target-cpu to clang
It is not supported by bitcode embedding on Apple platforms.
Instead, we set it in function attributes directly as Clang does.
2021-08-06 14:19:41 +00:00
Sergey Bogolepov e177cecd50 [K/N] Specify -target-cpu for all targets
Motivation:
1. Avoid things like KT-47911.
2. Generate a bit more effective code in some cases.
3. A bit easier -Xoverride-konan-properties.
2021-08-03 05:54:36 +00:00
Sergey Bogolepov b37cdae966 [K/N] Fix KT-47911
Specify target-cpu when compiling for AArch64 Darwin targets, because
Apple's CPU might execute "movi.2d vD, #0" incorrectly.

See https://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20171218/511205.html.
2021-08-03 05:54:35 +00:00
Sergey Bogolepov 7d8360f38b [K/N] Set target-features for host targets
Benchmarks on CI show that there are some performance regressions after
LLVM update due to worse inliner results. Explicit specification of
target-features fixes the problem. Interestingly, it seems that this is
not required for Darwin AArch64 target.
2021-08-03 05:42:08 +00:00
Sergey Bogolepov c7c78e0e1a [K/N] Use LLD 12.0.1 for MinGW targets
Clang-produced and GCC-produced binaries might be ABI-incompatible on
MinGW. Explanation on GitHub: msys2/MINGW-packages/issues/6855#issuecomment-680859662.
TL;DR: GCC-generated sections are 16-byte-padded, while Clang ones are
not. It causes problems during merge of COMDAT sections.
I observed the problem during compilation of runtime tests, but it is
possible that the problem could affect main compilation pipeline as well.
https://reviews.llvm.org/D86659 (which landed in LLVM 12) fixes
the problem. So we have another motivation for switching to LLD besides
https://youtrack.jetbrains.com/issue/KT-47605.

The only known downside is unsupported defsym which causes slight binary
size increase. I think it is doable.
2021-08-03 05:42:06 +00:00
Sergey Bogolepov 6e093b0beb [K/N] Update libffi for Windows
MinGW and MSVC are hardly compatible in case of static linkage, so we
need to use a native libffi.
2021-08-03 05:42:06 +00:00
Sergey Bogolepov a525f3f357 [K/N] Fix path to ld.gold on Windows
targetToolchain.mingw_x64-linux_* are changed, so we should their usages
Probably, we could switch to LLD, but it requires additional testing.
2021-08-03 05:42:05 +00:00
Sergey Bogolepov 66ddd15798 [K/N] Support compiler compilation in MSVC environment
The right way is to add something like KonanTarget.MSVC_X64, but doing
so requires changes throughout whole compiler. It would be especially
painful in HostManager, where we would need to deprecate
KonanTarget.MINGW_X64 as host. Instead we "hack" ClangArgs to compile
for x86_64-pc-windows-msvc instead of x86_64-pc-windows-gnu in JNI case.

CI may contain custom MSVC and Windows Kit installation path, so we
should support it. Things might break when machine has several MSVC
installed (at custom and default path), but it sounds more like
incorrect environment setup problem than ours.
2021-08-03 05:42:05 +00:00
Sergey Bogolepov 0d39442a5e [K/N] Update linux_arm32_hfp llvm target features
Set of target features has changed between LLVM 8 and LLVM 11.
Update the list for linux_arm32_hfp to make clang stop complaining.
2021-08-03 05:42:03 +00:00
Sergey Bogolepov 1c7a27ce42 [K/N] Fix mxgot flag for MIPS
It was dropped from cc1 interface, so use -target-feature +xgot instead.
2021-08-03 05:42:03 +00:00
Sergey Bogolepov e8b025f267 [K/N] Drop obsolete --no-threads LLD flags
--no-threads flag was used, because LLD had deadlock long time ago.
This flag is removed from LLD (in favor of --threads=N) and it looks
like that the bug is gone now. So we can just drop --no-threads flag!
2021-08-03 05:42:03 +00:00
Sergey Bogolepov 023c775188 [K/N] Bump macOS minimal version 2021-08-03 05:42:01 +00:00