Sergey Bogolepov
3a008f6236
Cleanup ClangArgs.kt a little bit
2021-03-24 17:37:50 +03:00
Sergey Bogolepov
273b43d227
Simplify setting apple os version in ClangArgs
...
Use `osVersionMinFlagClang` from konan.properties
instead of manual setup in ClangArgs.
This simplification will make it easier to add support
for future targets.
2021-03-24 17:37:49 +03:00
Sergey Bogolepov
51d3d1f1a8
ClangArgs: Set stdlib for apple targets in a single place
2021-03-24 17:37:48 +03:00
Sergey Bogolepov
f339e9cc66
ClangArgs: Set arch for apple targets in a single place
2021-03-24 17:37:47 +03:00
Sergey Bogolepov
30863cd184
Support the rest of Linux targets on macos_arm64
2021-03-24 17:37:45 +03:00
Sergey Bogolepov
0e1276fc6c
Support the rest of Apple targets on macos_arm64
2021-03-24 17:37:44 +03:00
Sergey Bogolepov
58e0cc1c7c
Specify linker for macos_arm64-linux_x64
2021-03-24 17:37:42 +03:00
Sergey Bogolepov
579c1eb7db
Remove libffi from target dependencies
...
Technically, it is a dependency of a compiler itself.
Thus, we can simplify konan.properties a little bit
by applying the same approach as we did for LLVM.
2021-03-24 17:37:40 +03:00
Svyatoslav Scherbina
940774caaf
Native: remove README.md from binary distributions
...
It is outdated, and the presumed contents are covered by other docs.
2021-03-24 10:56:35 +00:00
Dmitriy Dolovov
dfd3b54ee4
Native: Handle integer overflow on div/rem of Int.MIN_VALUE by -1
...
^KT-45136
2021-03-24 09:55:46 +03:00
Igor Chevdar
752be27557
[K/N][tests] Disabled failing test for now
2021-03-23 11:57:56 +05:00
Svyatoslav Scherbina
818659f2bb
Native: fix bug in KType support affecting only stdlib
...
Don't use IrClass.declarations to find enum entries during lowerings,
because this enum might already be lowered and thus have all entries
removed.
2021-03-23 09:45:40 +03:00
Svyatoslav Scherbina
0730833135
Remove kotlin-native/common/src/hash
...
It is no longer used.
2021-03-22 16:03:31 +00:00
Svyatoslav Scherbina
ce239ccc3e
Native runtime: remove unused dependency on common/src/hash
...
No longer required after c8633d8bda .
2021-03-22 16:03:30 +00:00
Svyatoslav Scherbina
2a7ccb11e8
Native compiler: remove unused dependency on common/src/hash
2021-03-22 16:03:29 +00:00
Svyatoslav Scherbina
a471bbc185
Native compiler: remove unused hashing code
...
It was used to compute hashes for class names, but this is no longer
required after c6ac807034 .
2021-03-22 16:03:28 +00:00
Svyatoslav Scherbina
39d748dbbb
Native compiler: replace C++ CityHash64 impl by Kotlin one
2021-03-22 16:03:28 +00:00
Sergey Bogolepov
8ba4f060f0
Enable linuxX64 target on macOsArm64 host
...
Because tests for Gradle plugin assumes that linuxX64
is available on all hosts.
2021-03-22 14:02:43 +03:00
Sergey Bogolepov
7e18b69e7d
Add initial support for macos_arm64 host
2021-03-22 14:02:41 +03:00
Sergey Bogolepov
4222fb9629
Remove unused filterGradleNativeSoftwareFlags method
2021-03-22 14:02:40 +03:00
Sergey Bogolepov
ec23ebd1c5
Fix workerAutoreleasePool test on macos_arm64 using __autoreleasing
...
Also merge `createAutorelease` and `create. There is no need in
such separation since it was originally added to prevent
optimization `result`'s lifetime.
Turned out, it was still happening on Apple Silicon,
and only addition of __autoreleasing attribute solves the problem.
2021-03-22 14:02:39 +03:00
Svyatoslav Scherbina
8b3ff11a2b
Provide CName annotation in common stdlib as optional
2021-03-22 09:20:05 +00:00
Sergey Bogolepov
af3ff6c4d6
Revert "Revert "Remove unused protobuf from backend.native""
...
This reverts commit c4182c82
2021-03-19 15:24:44 +03:00
Sergey Bogolepov
bba82c0d60
Revert "Revert "Remove obsolete bc.frontend module""
...
This reverts commit e7a385f9
2021-03-19 15:24:43 +03:00
Alexander Shabalin
5b1c30c198
Extract initializing singleton marker
...
* Extract kInitializingSingleton marker
* Extract isNullOrMarker helper function
2021-03-19 08:19:10 +00:00
Vasily Levchenko
b3ae30fdea
[llvm][context util] make error more readable
2021-03-19 08:04:00 +00:00
Sergey Bogolepov
e320f7efc3
Add libffi buildscript for Apple Silicon
2021-03-19 07:21:39 +00:00
Svyatoslav Scherbina
a9d0409f2e
Don't use Function.reflect() in kotlin-native/Interop on JVM
...
Use inline functions and typeOf<T>() instead
2021-03-19 06:53:09 +00:00
Pavel Punegov
cae95b1ba0
[native] Fix kotlin.native.home properties order.
2021-03-18 14:41:03 +00:00
Nikolay Krasko
e7a385f9da
Revert "Remove obsolete bc.frontend module"
...
This reverts commit b48a42a5
2021-03-17 20:40:00 +03:00
Nikolay Krasko
c4182c8269
Revert "Remove unused protobuf from backend.native"
...
This reverts commit 7a526a85
2021-03-17 20:39:35 +03:00
Svyatoslav Scherbina
542518f290
Remove contents of kotlin-native/CHANGELOG.md
...
Keep only links to old and new changelogs.
2021-03-17 13:53:05 +00:00
Svyatoslav Scherbina
8a940fc075
Update kotlin-native/BUILDING_LLVM.md after build rework
...
Running `dependencies:update` task is no longer required.
2021-03-17 13:53:04 +00:00
Svyatoslav Scherbina
1f5830404c
Native: remove documents that were migrated to kotlin-web-site
...
These documents were moved from kotlin-native repo to kotlin-web-site.
So copies that got merged into kotlin repo are unused.
2021-03-17 13:53:03 +00:00
Sergey Bogolepov
7a526a852f
Remove unused protobuf from backend.native
2021-03-17 13:44:05 +00:00
Sergey Bogolepov
b48a42a5a6
Remove obsolete bc.frontend module
2021-03-17 13:44:04 +00:00
Nikolay Krasko
aff25b3666
Remove jcenter usages
2021-03-16 22:24:10 +03:00
Ilya Matveev
6643119f08
[K/N][New MM] Move ThreadStateGuard to the main Memory.h
...
Integrating the stdlib with the thread states machinery requires
accessing to some parts of the new MM. This patch provides this
access by moving these parts to the main Memory.h header.
2021-03-16 17:04:26 +03:00
Ilya Matveev
482305cfb2
[K/N][New MM] Move RunInNewThread to the main ThreadSupport.hpp
...
Some of unit-tests for the C++ part of the stdlib will require
thread state switching. In the new MM, we already have a helper
function that allows us to scopely initialize the memory subsystem
for a separate thread. This patch makes this helper available
for tests in the main runtime module by moving it to the main
ThreadSupport.hpp.
2021-03-16 17:04:25 +03:00
Ilya Matveev
fc43fbf578
[K/N][New MM] Move MemoryState conversions to separate header
2021-03-16 17:04:23 +03:00
Svyatoslav Scherbina
1f6f996faf
kotlin-native/samples: workaround build for linuxArm32Hfp
...
libSDL2.so is missing in new sysroot (since 1.5), use one from
the old sysroot as a workaround.
2021-03-16 11:58:56 +00:00
Alexander Udalov
d9a9bd0136
Fix compilation of Interop/Runtime after fc36178f3a
2021-03-15 20:34:24 +01:00
Svyatoslav Scherbina
14cb762133
Update the docs to reflect Kotlin/Native merge to kotlin repo
...
Also:
* Revamp kotlin-native/README.md a bit: make it more up-to-date,
add useful links
* Remove "composite build" section from ReadMe.md:
it was used for Kotlin + Kotlin/Native composite;
this is no longer required.
2021-03-15 14:09:00 +00:00
Igor Chevdar
c37f8ba708
[IR][cache] Fix for https://youtrack.jetbrains.com/issue/KT-44764
...
The .konanLibrary is cached for each declaration for performance purposes, but it is only ok to do it
after IR has been lowered to its final state (or at least when declarations aren't being moved around),
so the fix respects that by only taking .konanLibrary of a IrFile (it is assumed that files stay on their place
during entire backend lowering procedure).
(cherry picked from commit e021138368b48e306ba99a96f47d93ecbe039f4d)
2021-03-15 15:54:51 +03:00
Alexander Udalov
c56f719dcc
Fix/suppress some warnings
...
(cherry picked from commit d8a43c216925b3a9e1475b786978436835a57927)
2021-03-15 15:54:50 +03:00
Igor Chevdar
c5249ac714
Disposed target data
...
(cherry picked from commit 250be87acf66d5c780fb593f46da3540a536e049)
2021-03-15 15:54:49 +03:00
Vladimir Ivanov
ba50a8275c
Add test for [KT-3706]
...
Issue is already fixed by metadata-based cinterop
(cherry picked from commit fd4f5b2c07ebdc431d6243ac087f911ee30e88ca)
2021-03-15 15:54:48 +03:00
Vladimir Ivanov
64129314fb
Fix sample file naming for case-sensitive FS
...
(cherry picked from commit 72235c31852fba4f2ab330d8178197c2584b1cda)
2021-03-15 15:54:46 +03:00
Alexander Shabalin
f51c85a63f
Add test support for types and objects creation
...
* test_support::TypeInfoHolder to create TypeInfo given payload description
* test_support::Object<Payload> to create objects with Payload and to get them from ObjHeader* after checking that their type_info are layout compatible.
* test_support::*Array<Count> to create various arrays with given length and similarly get them from ArrayHeader*.
2021-03-15 11:25:04 +00:00
Dmitriy Novozhilov
f5d00716d1
Advance kotlin-build-gradle-plugin version to 0.0.26
2021-03-15 12:13:01 +03:00