Commit Graph

47 Commits

Author SHA1 Message Date
Nikolay Igotti 42197a2bec Android NDK support and build system refactoring (#585) 2017-05-24 00:20:19 +03:00
Alexander Gorshenev 48742b7f3f Library search path resolution. 2017-05-23 16:40:48 +03:00
Alexander Gorshenev 3b5ce031f8 Initial checkin of klib support.
The libraries exist in two incarnations:
    packed foo.klib and unpacked foo/ .
The compiler when given '-library foo' expects to find either
a foo.klib file and unpack it, or an already unpacked foo/ directory.

The stdlib is always unpacked in dist/klib .

The semantics of -o has changed slightly.
It now accepts '-o foo' and the compiler
either produces foo.kexe or foo.klib .
2017-05-18 04:13:35 +03:00
Igor Chevdar 8f53018653 Disabled warning that coroutines are experimental 2017-05-11 12:51:05 +03:00
Ilya Matveev adb6e17b60 backend: Implement executableScriptFileName method in K2Native 2017-05-03 22:06:26 +07:00
Vasily Levchenko 92964e1eae kotlin-compiler:1.1-20170424.172927-491 2017-04-24 22:35:39 +03:00
Vasily Levchenko 7e9a01b6ba DRIVER: added '-g' key to enable emitting debug information 2017-04-19 09:52:05 +03:00
Alexander Udalov a4eceb3e3a kotlin-compiler:1.1-20170417.154352-466
- Fix usage of new Kotlin command line arguments API
(cherry picked from commit fb8534d05d2f69902fd1add631754f7cdfb75c89)
2017-04-18 19:36:00 +03:00
Igor Chevdar f389afee16 Added compiler arg --print_ir_with_descriptors
Sometimes it would be useful to see IR with all corresponding
descriptors - now it is possible.
2017-04-10 14:45:55 +03:00
SvyatoslavScherbina 058bb728df kotlin-compiler: 1.1-20170403.193854-443 (#452) 2017-04-05 20:48:58 +03:00
Svyatoslav Scherbina f564bd7707 Always link bitcode files specified with -nativelibrary 2017-03-30 15:55:39 +03:00
Nikolay Igotti 0cbd34086e Added JB copyright (#417) 2017-03-30 09:51:58 +03:00
Alexander Gorshenev 89ea6396f6 It should be --time, not -time.
It should be -list_targets, not --list_targets.
The -list should better be -list_phases now that we have several sets to list.
2017-03-29 12:10:41 +03:00
Ilya Matveev 6dea5e5c79 tools: Don't use Distribution class in helpers 2017-03-29 14:42:48 +07:00
Vasily Levchenko d106e9e8d9 FLAGS: added --print_locations flag (boolean) for printing lines/column information
(cherry picked from commit 9decbaadfb3ef7ca946a732a03e475b576f4f1be)
2017-03-28 15:56:14 +03:00
Ilya Matveev fbc14becfc tools: Add dependecy download helpers
This patch adds 2 helpers to download dependencies for compiler and
stub generator during their execution.

They take list of external dependencies as a parameter and directory
where they must be located. Helpers check if these dependencies exist
in the given directory and download not existing ones.
2017-03-24 19:31:23 +07:00
Alexander Gorshenev c06eeb096a Removed -compile_as_stdlib mode, as it is not needed anymore.
Moved "compiler hacker" options to use double dash. Like "--verbose linker".
2017-03-22 16:16:50 +04:00
Alexander Gorshenev 2d0aa9dcbb Introduced -nomain flag to disable generation of main(),
in assumption that it is provided by one of the libraries.
2017-03-21 18:05:03 +04:00
Nikolay Igotti c6845cf929 Implement on-load helper (#364) 2017-03-21 11:44:34 +03:00
Nikolay Igotti f3794aa206 Improve interop user experience and docs (#342) 2017-03-15 17:25:10 +03:00
Ilya Matveev 97b5bb527d backend: Generate assert call depending on the compiler key 2017-03-13 16:25:48 +03:00
Svyatoslav Scherbina 7ad36ac035 backend: implement '-linkerArg' to pass arguments to the linker 2017-03-13 11:00:33 +07:00
Nikolay Igotti 526c0dc924 Speed up large file compilation. (#308) 2017-03-07 13:40:25 +03:00
Svyatoslav Scherbina 093671f549 backend: rework builtIns configuration
* Do not create separate builtIns for analyzer.
* Make builtInsModule synthetic but depending on stdlib.
2017-02-28 17:44:22 +07:00
Ilya Matveev 489723721f frontend: Stop compilation in case of frontend error 2017-02-22 16:16:57 +03:00
Svyatoslav Scherbina 97cd2b4d5f backend: implement '-nativelibrary' command line argument 2017-02-06 11:58:10 +07:00
Alexander Gorshenev afaa50ce34 Introduced -target and -list_targets flags.
Use it like

    $ konanc hello.kt -target iphone
2017-01-23 00:17:39 +04:00
Alexander Gorshenev c15fb6833d Profiling machinery. 2016-12-29 16:07:43 +04:00
Alexander Gorshenev 413f47fda5 Removed 'clang' invocations in favour of llvm tools and 'ld'.
Introduced LinkStage in the compiler.

Removed the link stage from 'konanc'.

Removed duplicate :stdlib and :start targets.

Simplified test run task a lot.
2016-12-28 02:13:07 +04:00
Alexander Gorshenev a1786614ea Removed Javascript serializer from Konan.
Introduced our own serializer.
2016-12-20 19:32:27 +04:00
Alexander Gorshenev 35668cc7e1 Added phase control flags.
-print_descriptors
-print_ir
-print_bitcode

-verify_descriptors
-verify_ir
-verify_bitcode

-list

-enable <phase name>
-disable <phase name>
-verbose <phase name>
2016-12-13 21:31:47 +04:00
Konstantin Anisimov 8496a0f2a9 CODEGEN: naive implementation of string_concatination (not tested)
(cherry picked from commit 8e0e9480d7cbec6e640f1b5a8a15af0d2f1bc278)
2016-11-25 23:37:49 +03:00
Alexander Gorshenev 1d265bc50c Here goes stdlib separation.
$ gradlew backend.native:stdlib

builds you stdlib.kt.bc now.

The test runs are taught to supply
-library stdlib.kt.bc to kotlin compiler for proper imports resolution,
and then later stdlib.kt.bc is provided to clang for the final link step.
2016-11-18 19:11:38 +04:00
Alexander Gorshenev b0d10e45d8 changed DynamicTypesAllowed() to DynamicTypesSettings() in KonanPlatformConfigurator.kt 2016-11-18 19:11:38 +04:00
Alexander Gorshenev 8321c14e36 Introduced KonanPlatform, KonanConfig, TopDownAnalyzerFacadeForKonan
and several other supporting facilities
2016-11-17 18:16:15 +04:00
Vasily Levchenko 5b7d0257e8 upgrade kotlin-compiler: 20161108.133759-248 2016-11-08 17:38:09 +03:00
Alexander Udalov a7bef2d0ee Lower priority of compiler built-ins in resolution (#43)
* Remove unneeded module context creation in K2Native

Calling this method is useful only when its result is used

* Use JvmAbi from compiler instead of reflection implementation

Package "kotlin.reflect.jvm.internal.impl" is internal implementation detail of
kotlin-reflect and should not be used

* Run native back-end with "-ea"

This allows to get more detailed messages in case something fails

* Lower priority of compiler built-ins in resolution

CREATE_BUILT_INS_FROM_MODULE_DEPENDENCIES makes sure that the "built-ins" that
the compiler front-end uses during the resolution are loaded from the module
being resolved itself, i.e. from its sources and/or dependencies. E.g. if
there's a class named kotlin.Any in module sources, it'll become the default
supertype for any class without an explicit supertype.

ADD_BUILT_INS_FROM_COMPILER_TO_DEPENDENCIES adds the built-ins from the
compiler jar to the end of the dependencies list of the module being resolved.
This option makes sure that if there's no built-in class in module
sources/dependencies and it is required by the front-end, the class definition
from the compiler jar will be taken instead of failing with an exception.

If both of these options are turned on, the effect is basically that compiler
built-ins are still there in the classpath, but have a lower priority than
classes explicitly declared in sources
2016-11-08 16:20:33 +03:00
Alexander Gorshenev 67889cb31c Further relocation from 'native' to 'kotlin'
Moved the left behind files and renamed the package.
2016-11-08 13:22:24 +03:00
Nikolay Igotti a2e4f0f467 Move compiler to new version, add primitive types. (#33) 2016-11-03 15:31:33 +03:00
Nikolay Igotti 7eeb2d3046 Various fixes for HelloWorld. (#27) 2016-11-01 15:33:41 +03:00
Konstantin Anisimov 64e9f2a2f7 minor refactoring in native to frontend interface 2016-10-28 16:59:06 +03:00
Vasily Levchenko 639c4f9786 frontend: prints compilation error 2016-10-20 23:03:10 +03:00
Vasily Levchenko ddae560ffe support new interface for jvm frontend 2016-10-17 14:03:25 +03:00
Vasily Levchenko bbe86f25bc hardcoded (temporary) path to extensions/common.xml, to fix fall on unresolved symbols 2016-10-07 17:17:53 +03:00
Svyatoslav Scherbina 277835fccb backend.native: add some dirty code to emit bitcode with RTTI for fields 2016-09-29 17:41:54 +07:00
Svyatoslav Scherbina 78a912f637 backend.native: tie compiler to runtime
to make compiler able to refer entities declared in runtime
2016-09-29 17:41:54 +07:00
Vasily Levchenko 0eaaa58ed9 HEAD UPS! Global move: experiments -> kotlin-native 2016-09-28 13:22:36 +03:00