Commit Graph

86 Commits

Author SHA1 Message Date
Pavel Punegov c9aeadd31f [K/N] Remove old Compiler and Meta Version ^KT-55677 Fixed
* Replace it with KotlinCompilerVersion
* K/N version should be set now with `deployVersion`.
* Cleanup deprecated functions in older versions
 of the Gradle plugin
* Cleanup tests for older versions of compiler downloader

Merge-request: KT-MR-8436
Merged-by: Pavel Punegov <Pavel.Punegov@jetbrains.com>
2023-01-30 13:10:08 +00:00
Mikhail Glukhikh 7a61578e08 Language version 2.0: fix compiler messages and minor details 2023-01-16 18:16:48 +01:00
Artem Daugel-Dauge 0d1e7e83b5 [K/N, CLI] Pass through errors from Gradle to Xcode
^KT-55650

Merge-request: KT-MR-8245
Merged-by: Artem Daugel-Dauge <Artem.Daugel-Dauge@jetbrains.com>
2023-01-13 20:54:05 +00:00
Igor Chevdar 9aa287257b [K/N] Refactored a bit configuration setup 2023-01-11 14:13:04 +00:00
Igor Chevdar 9c86532eb0 [K/N] Implemented cache orchestration machinery in the compiler 2023-01-11 14:13:01 +00:00
Vladimir Sukharev 924898afb7 [K/N] KFC-446: K2 platform: Native alpha
Merge-request: KT-MR-7905
Merged-by: Vladimir Sukharev <Vladimir.Sukharev@jetbrains.com>
2023-01-04 16:10:40 +00:00
Sergey Bogolepov 366edcfe3c [K/N] Drop obsolete static driver 2022-12-20 06:30:36 +00:00
Troels Bjerre Lund bb1acf729b [K/N] Add custom allocator prototype ^KT-55364
Enable custom allocator with -Xallocator=custom.

If the gc is cms (default):
 * a patched version of the memory manager is used that does not build a
   list of allocated objects.
 * a patched version of the cms is used that defers to the allocator for
   sweeping.

Otherwise, a warning is printed, and the allocator is used using the
standard api.

Design doc:
https://docs.google.com/document/d/15xMp-nE-DWL8OrtOc8DoXB80AHUphFICEGjj5K0aNFc

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

Merge-request: KOTLIN-MR-546
Merged-by: Alexander Shabalin <alexander.shabalin@jetbrains.com>
2022-12-08 17:22:04 +00:00
Sergej Jaskiewicz 1539d7ef1a [klib] Bring package names in sync with the directory layout
Basically, some package names were Native-specific, whilst the packages
themselves were not Native-specific at all. This was already reflected
in the directory layout, but not in the package names.
This is fixed here.

NFC, just an automatic rename of packages with fixes of imports.
2022-12-01 21:46:43 +00:00
Sergey Bogolepov c22cad07ed Introduce FlexiblePhaseConfig
For dynamic Kotlin/Native driver we need a PhaseConfigurationService
that does not force us to provide a list of phases upfront.
2022-11-30 11:24:38 +00:00
Sebastian Sellmair 7870c82221 [Gradle][Native] K2NativeCompilerArguments.refinesPaths: Use Array<String> instead of String
^KT-55071 Verification Pending
2022-11-24 14:42:11 +00:00
Sebastian Sellmair 752ff04245 [Gradle][Native] Setup refinesPaths as expectedBy module dependencies
Previously, dependsOn dependencies were just passed as friend modules
to shared native compilations.

^KT-55071 Verification Pending
2022-11-24 14:42:10 +00:00
Svyatoslav Scherbina 2987340edd Get rid of unsafe cast function usages in :kotlin-native:backend.native 2022-10-11 15:11:36 +00:00
Svyatoslav Scherbina 28dea9d949 Native: remove obsolete compiler flags that have no effect
Same for compiler configuration keys.
2022-10-07 15:33:42 +00:00
Sergey Bogolepov d7fff3ca01 [K/N] Add -Xforce-compiler-driver=(static, dynamic) flag
Useful for development purposes when one wants to compare
the outputs of different drivers.
2022-10-06 13:10:50 +00:00
Igor Chevdar 1963860a92 [K/N][caches] Removed old slow and hacky version of per-file caches building 2022-09-27 17:06:48 +00:00
Igor Chevdar 77f24a22dd [K/N][IR][codegen][caches] Speed-up of per-file caches 2022-09-27 17:06:48 +00:00
Igor Chevdar 030e3b306f [K/N][build] Added -Xmake-per-file-cache compiler option 2022-08-06 17:40:24 +00:00
Igor Chevdar 7e79b2b500 [K/N][IR][codegen] Preliminary support of per-file caches 2022-08-06 17:40:23 +00:00
Sergey Bogolepov cd54afea8f [K/N] Add option to omit generation of binary when producing framework
`-Xomit-framework-binary` is useful when the user does not care about
generated machine code, but only about its public interface.
Current use-case is for development purposes only: to iterate faster
on ObjCExport. But potentially it can be turned into user-facing feature
2022-07-22 11:57:15 +00:00
Dmitriy Novozhilov 928416c9c5 [CLI] Introduce new compiler arguments for registering compiler plugins
With new syntax each plugin should be registered in separate argument with syntax
`-Xcompiler-plugin=classpath1,classpath2[=argument1=value1,argument2=value2]`
2022-07-20 09:07:26 +00:00
Yahor Berdnikau 603d043abc Move Kotlin/Native compiler arguments into :compiler:cli:cli-common
This allows to reference them in the Gradle plugins without enabling
kotlin-native part of the repository

^KT-53108 In Progress
2022-07-14 10:57:28 +00:00
Sergey Bogolepov 231a014818 [K/N] Drop obsolete -Xmeaningful-bridge-names compiler flag 2022-07-13 17:15:17 +00:00
Mads Ager ef499fedbb [K/N] Deprecate -Xbundle-id and use binary options for Info.plist. 2022-06-23 09:57:13 +00:00
Mads Ager c7e7080af6 [K/N] Allow control of BundleShortVersionString and BundleVersion
Adding -Xbundle-version and -Xbundle-short-version-string
compiler arguments. These can be used in the freeCompilerArgs
in the gradle configuration to control the version strings
in the Info.plist in generated frameworks.

```
version = "1.0"

macosX64("native") {
    binaries.framework {
        compilation.kotlinOptions.freeCompilerArgs += "-Xbundle-version=$version"
    }
}
```

^KT-33117 Fixed.
2022-06-23 09:57:12 +00:00
Pavel Kunyavskiy 9801a21abb [K/N] Enable new mm for native by default 2022-05-11 10:26:13 +00:00
Mikhail Glukhikh 08ba89b4ec CLI K2: report an error for JS/Native/Metadata #KT-52035 Fixed 2022-04-28 13:25:48 +00:00
Svyatoslav Scherbina 4cf10686d6 Native: delete konan_temp right after the compilation instead of on exit
The Kotlin/Native compiler uses `.deleteOnExit()` as a substitute for
"delete after the compilation". But when the compiler runs in a Gradle
daemon, `.deleteOnExit()` means "delete on Gradle daemon exit", which
might be not soon. If a single Gradle daemon runs the compiler many
times, the remaining temporary files can consume quite a lot of disk
space. For example, this is the case for the Kotlin build.

Replace some of `.deleteOnExit()` calls with an explicit removal of
temporary files at the end of a compilation session.
2022-04-22 06:47:39 +00:00
Sergey Bogolepov 21399b4edd [K/N] Update documentation on building and using LLVM 2022-04-19 14:27:33 +00:00
Dmitriy Dolovov 56510fbc6c [Native][tests] Dump the list of all available tests during compilation
^KT-50316
2022-02-17 12:45:37 +03:00
Ilya Matveev 1e78036a1b [K/N] Enable CMS GC by default for the new MM
Issue #KT-50713 Fixed
2022-01-28 12:24:57 +07:00
Dmitriy Dolovov cc37934d6f [IR, Native] Add compiler flag for partial linkage mode
^KT-50775
2022-01-26 13:36:23 +03:00
Dmitriy Novozhilov dd953908df [FE 1.0] Add compiler flag for rendering internal diagnostic names in error messages 2022-01-23 11:14:56 +03:00
Alexander Udalov 8b57675002 Revert "Remove obsolete check for language version and IR backends"
This check is no longer obsolete since language version 1.3 support is
restored for Kotlin/JVM, but JS and Native never supported LV 1.3.

This is a partial revert of 0213c25c9b,
without the diagnostic in K2JVMCompilerArguments (which is not needed
since the earliest supported LV is 1.3).

 #KT-50695 Fixed
2022-01-10 21:15:51 +01:00
Pavel Kunyavskiy c97f4a4d20 [K/N] Support -Xsave-llvm-ir-after compiler option 2021-12-23 11:09:27 +00:00
Alexander Shabalin cc8f278948 [K/N] Add a separate aggressive GC scheduler
^KT-48537

Merge-request: KT-MR-5253
Merged-by: Alexander Shabalin <Alexander.Shabalin@jetbrains.com>
2021-12-20 11:04:46 +00:00
Roman Artemev a68eabac0a [K/N] Setup config about path relativeness and normalization in config 2021-12-15 21:13:52 +03:00
Pavel Kunyavskiy 3a8b4059c9 [K/N] Disable cms for targets not supporting threads 2021-12-13 05:32:11 +00:00
Pavel Kunyavskiy df4b367296 [K/N] Add cms related targets and compiler option 2021-12-13 05:32:10 +00:00
Svyatoslav Scherbina ab6c8a4abe Native: make parseBinaryOptions public 2021-11-30 08:23:59 +00:00
Elena Lepilkina 1b4ee63f30 [K/N] Deprecate and remove from supported list relaxed memory model 2021-11-02 12:04:46 +00:00
Sergey Bogolepov e37d669dc3 [K/N] Opt-in for meaningful names for in "objc2kotlin" bridges
It is hard to run FileCheck tests over generated ObjC bridges because
they share the same name ("objc2kotlin"). To overcome this hurdle,
this commit introduces a compiler flag that appends function name to
"objc2_kotlin". This change might be useful for end-users, for example,
it makes stacktraces more readable. But it will require additional
testing and polishing which is out of the scope of this change.
2021-10-29 04:07:28 +00:00
Igor Chevdar 0cece79856 [K/N][IR][codegen] Use LazyIr for cached libraries
It's not that simple because we still need inline functions bodies
and classes fields which aren't present in Lazy IR. To overcome this,
save additional binary info for a cached library and then use it when needed
2021-10-05 10:47:52 +05:00
Sergey Bogolepov 7a3f33ad0b [K/N] Add option to save unoptimized bitcode
Add `-Xsave-llvm-ir` option that stores LLVM IR text into temporary
directory right after IrToBitcode translation. This is required for
FileCheck-based tests and just helpful during development.
2021-10-01 14:18:00 +00:00
Ilya Matveev bfe336b0db [K/N] Add an option to specify a bundle ID of a produced framework 2021-09-21 09:26:54 +00:00
Ilya Matveev 8b52411292 [K/N] Allow running compiler with exported libs and without sources 2021-09-21 09:26:51 +00:00
Mikhail Glukhikh 007cf2ce7c Rename AnalysisFlags.useExperimental to optIn 2021-09-10 16:29:18 +03:00
Elena Lepilkina aaf666e0e1 [K/N] Turn on mimalloc by default for experimental MM 2021-09-09 13:41:37 +00:00
Alexander Udalov 0213c25c9b Remove obsolete check for language version and IR backends 2021-09-01 16:30:41 +02:00
Svyatoslav Scherbina 5bdfa14a37 Native: make -Xbinary=memoryModel= equivalent to -memory-model=
In particular, the former now enables lazy initialization and hook-based
worker exception handling too, as intended.
2021-08-29 07:35:32 +00:00