Commit Graph

23 Commits

Author SHA1 Message Date
Alexander Udalov 17a8d24a84 Fix warnings in Util.kt
There were unreachable code warnings in printMillisec, and indeed the
variable assignment was never executed, so the function would always
print "0 msec".
2021-03-01 19:47:24 +01:00
Vasily Levchenko ec0f6b9ede [build][kotlin-build-gradle-plugin] bump version 0.0.25
- kotlin native versioning support
- disable metadata
- fixes of drop 0 maintanence clause
- support for kotlin.native.enabled flag to switch on/off kotlin native build
- add mode to version generatation to dump version to resourse file
2021-02-24 11:07:14 +01:00
Roman Artemev 75016bf54d [Gradle, JS] Fix bridge between Gradle and Js IR CLI 2021-01-26 19:23:25 +03:00
Sergey Bogolepov eeda48e63e Allow prefix and relative path in resolvable properties.
It allows us to move more logic to konan.properties from ClangArgs.
E.g., something like `-$absoluteTargetSysRoot/usr/include/c++/4.9.4`
2020-10-22 12:45:49 +07:00
Sergey Bogolepov 2154c94100 [Native] Add tests for resolvable properties 2020-09-15 13:54:10 +07:00
Sergey Bogolepov 5a0a853d9b [Native] Add simple symbol mechanism to konan.properties
Java Properties format is extremely trivial and does not support any
kind of references or variables. It makes konan.properties repetitive.
This commits adds support of perl-like `$` sigil which allows to
reference properties inside values.
2020-09-15 13:54:09 +07:00
Ilya Matveev 03bb9138ad [klib] Create ZipFileSystem from a Path instead of an URI
Calling FileSystems.newFileSystem(URI, ...) throws a
FileSystemAlreadyExistsException if a ZipFileSystem for this
URI is already created. We still can use a single instance
of ZipFileSystem by calling FileSystems.getFileSystem. In
this case we use reference counting to determine when this
instance can be safely closed.

But we cannot count references if the same ZipFileSystem is used
from different class loaders. This patch fixes this issue by
creating a file system from Path instead of an URI. Contract of
FileSystemProvider.newFileSystem(Path, ...) doesn't imply throwing
FileSystemAlreadyExistsException.

Issue #KT-37443 fixed
2020-06-18 14:17:59 +00:00
Nikolay Krasko 4230a17427 Revert "Force bootstrap stdlib in modules that used in composite build"
This reverts commit ad76562c
2020-04-27 15:58:38 +03:00
Nikolay Krasko ad76562cbc Force bootstrap stdlib in modules that used in composite build 2020-04-27 15:36:49 +03:00
Martin Petrov bc96e42585 Produce deterministic klib files.
Build systems like bazel rely on the output of a compilation being
deterministic. File checksums determine when an artifact is safe to
cache across builds. One can produce a klib deterministically by using a
fixed timestamp during klib compression.

Before this change:

```
$ kotlinc-native  -produce library -output /tmp/first/color.klib Color.kt
$ kotlinc-native  -produce library -output /tmp/second/color.klib Color.kt
$ shasum  /tmp/first/color.klib /tmp/second/color.klib
bc3f73678ff025cfbec9009f9a851a8ca74e1037  /tmp/first/color.klib
65aa37886fbd53285f2e449a4dab6a2ad02732e6  /tmp/second/color.klib
```

After this change:

```
$ kotlinc-native  -produce library -output /tmp/first/color.klib Color.kt
$ kotlinc-native  -produce library -output /tmp/second/color.klib Color.kt
$ shasum  /tmp/first/color.klib /tmp/second/color.klib
fcba304493916ae34d372188991f87b60a113cf3  /tmp/first/color.klib
fcba304493916ae34d372188991f87b60a113cf3  /tmp/second/color.klib
```
2020-04-23 15:53:45 +03:00
Ilya Matveev 5f53986f47 [klibs] Allow resolving klibs which names are not valid file names 2020-04-19 19:08:43 +07:00
Dmitriy Dolovov 4c6bddf6be KLIB: Fix reading property lists in Properties.propertyList()
1. If property is absent, or contains empty string or a string consisting only of whitespace characters, Properties.propertyList() should always return empty List<String>.
2. If property starts or ends with whitespace characters, Properties.propertyList() should not include empty-string values for whitespace prefix or suffix.
2020-04-06 21:36:26 +07:00
Ilya Gorbunov fcada0a5e3 Make use of contracts of time measurement functions 2020-04-03 19:36:36 +03:00
Vasily Levchenko 98ce49ba73 [build][native] version with milestone clause 2020-02-21 13:51:20 +01:00
Dmitriy Dolovov 8028a3f55b Minor: Clean-up in konan File 2020-02-01 17:03:51 +07:00
Ilya Matveev 0725a336fc Fix data race in zip FileSystem reference counting
Issue #KT-36076 Fixed
2020-01-28 13:08:40 +07:00
Alexander Gorshenev 9a12641fde Allow parallel access to klib zip filesystem 2019-12-27 18:19:48 +03:00
Alexander Gorshenev b0f077ff4b Plumbing KlibMetadataVersion and KlibIrVersion values to klib manifest 2019-11-30 18:37:38 +03:00
Alexander Gorshenev c227c13799 Commonizing klib metadata between native and js 2019-10-01 17:38:57 +03:00
Vasily Levchenko 89d49479ab [util-io][properties] close file stream after save property operation ends.
(cherry picked from commit f0ae971f9304ecd7a2ba134ab77b511a0569ed5f)
2019-09-09 21:14:19 +03:00
Roman Artemev c8a3374829 [KLIB] Do not store Date in klib manifest 2019-09-03 14:21:31 +03:00
Igor Chevdar acf9670306 Fixed bug with file descriptors leakage 2019-06-10 13:41:57 +03:00
Alexander Gorshenev d1390365de Moved basic classes from konan/utils to util-io 2019-06-03 14:38:48 +03:00