Commit Graph

56 Commits

Author SHA1 Message Date
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 f5a627f6ff Allow -Pkonanc_flags="-print_bitcode" for gradle commands. 2016-12-14 20:40:45 +04:00
Nikolay Igotti 6565a5eb23 Fix broken build. 2016-12-11 20:40:17 +03:00
Nikolay Igotti 62e08b330e Switch away from snapshots. 2016-12-11 19:47:10 +03:00
Nikolay Igotti e1b91945d0 Restore proper compiler. 2016-11-28 12:05:40 +03:00
Alexander Gorshenev c84fe7fd85 Collected or scattered means of running the compiler in a shell script.
So one can now

$ ./gradlew dist

$ ./dist/bin/konanc backend.native/tests/runtime/basic/hello0.kt -o hello

$ ./hello

or one can

$ ./gradlew demo

and have a complete dist build,
with a test program compiled and executed automatically after that
2016-12-06 17:22:34 +04:00
Alexander Gorshenev 22d748001d Added "start" function between the C launcher and Kotlin "main" 2016-12-01 19:20:12 +04:00
Alexander Gorshenev 1aa7b23853 For better incrementality, specified :stdlib output file, as it is
non-standard for that kind of gradle task.
2016-12-01 19:20:12 +04:00
Vasily Levchenko 28918f92f7 kotlin-compiler: 1.1-20161201.112229-281 2016-12-01 15:26:10 +03:00
Vasily Levchenko 90d705aae2 kotlin-compiler: 1.1-20161128.112645-274 2016-11-28 19:24:18 +03:00
Svyatoslav Scherbina 3095044420 build: use Kotlin 1.1-M02 to build all Kotlin JVM sources 2016-11-22 13:01:14 +07:00
Vasily Levchenko ce059ac54b kotlin-compiler: .1-20161121.132728-268 2016-11-21 18:41:46 +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 16e4107dee kotlin-compiler: 1.1-20161116.235936-256 2016-11-17 14:56:07 +04:00
Vasily Levchenko c99baeaf5d kotlin-compiler: 1.1-20161111.171344-253 2016-11-14 14:41:22 +03:00
Svyatoslav Scherbina 3d36973022 backend/build: improve LLVM link options
Update options according to llvm-config:

* delete "--stdlib=libc++"  (it seems to provoke runtime link errors on Linux)
* remove "-lffi" (it doesn't seem to be required)
* remove "-lc++" on macOS

Also move Linux system libs options to llvm.def (as for macOS)
2016-11-14 14:12:25 +07:00
Svyatoslav Scherbina bee2a76008 build: refactor platform checks
also improve verbosity when downloading dependencies fails
2016-11-11 19:22:34 +07:00
Vasily Levchenko 5b7d0257e8 upgrade kotlin-compiler: 20161108.133759-248 2016-11-08 17:38:09 +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
Svyatoslav Scherbina 55f8257f92 build: simplify clang(++) configuration
also introduce 'execClang' block
2016-11-08 13:51:25 +07:00
Alexander Gorshenev 62f8b31cf0 Google protobuf has been added to the build 2016-11-07 18:14:50 +03:00
Vasily Levchenko 147de5d3ad added .usr/bin path to tools chain to take right variants of binutils from our system archieve 2016-11-07 17:25:08 +03:00
Nikolay Igotti a2e4f0f467 Move compiler to new version, add primitive types. (#33) 2016-11-03 15:31:33 +03:00
Nikolay Igotti 1f90f32397 Fix backend.native:run 2016-11-03 00:22:04 +03:00
Svyatoslav Scherbina 18ae8b2311 build: switch to Sonatype snapshots repo for kotlin-compiler
it is updated automatically by every successful build
2016-10-31 17:39:15 +07:00
Svyatoslav Scherbina 394b4ce6ec backend/build: depend on kotlin-compiler.jar from repo
instead of the jars from backend.native/kotlin-ir
2016-10-31 13:32:02 +07:00
Svyatoslav Scherbina 74ab1503c3 Interop: make gradle plugin more friendly to complex dependency management
when representing dependencies as file collection
some meta information gets lost
2016-10-31 13:32:02 +07:00
Vasily Levchenko dd6abfa188 linux build fix: static/dynamic and libraries ordering 2016-10-27 12:34:20 +03:00
Vasily Levchenko 8f9e6961e6 attempt to fix build 2016-10-27 10:20:21 +03:00
Vasily Levchenko c5a140bccc mac build fix 2016-10-26 22:46:05 +03:00
Vasily Levchenko e721a4e19d fix build: mac and linux should take llvm libraries from dependencies/all/clang+llvm..., instead from system path 2016-10-26 22:23:57 +03:00
Vasily Levchenko 202d03644d fix build: (mac and linux)
common fix of build: add to link flags -LlibffiDir -lffi
llvm.def: os specific remove from ldflags -lffi, it shoould appear after -LlibffiDir...
2016-10-26 21:16:17 +03:00
Vasily Levchenko 622ae34e61 attempt to fix linux build (:backend.native:run) 2016-10-26 13:33:28 +03:00
Vasily Levchenko a4dd4c241a gradle replacement for Makefile in tests 2016-10-26 13:12:22 +03:00
Svyatoslav Scherbina 5bb5cb70ee build: trivially support runtime sources written in Kotlin 2016-10-19 13:33:50 +03:00
Svyatoslav Scherbina 2835ddb7f2 build: add "LD_LIBRARY_PATH=llvmDir/lib" for Linux 2016-10-17 18:25:31 +03:00
Svyatoslav Scherbina e4bc19b145 build: download llvm and libffi from the JFrog repo 2016-10-17 17:35:57 +03:00
Svyatoslav Scherbina 8c4f5c3cef backend.native: add -fPIC for interop with :common:hash
to fix build on Linux
2016-10-13 18:12:21 +03:00
Svyatoslav Scherbina edc88c67da backend.native: include interop with :common:hash 2016-10-13 17:29:02 +03:00
Svyatoslav Scherbina 57cfc617a6 Interop: represent it as dependency in Gradle plugin 2016-10-12 16:29:52 +03:00
Vasily Levchenko ce10b5fb15 fix run command 2016-10-10 17:25:24 +03:00
Vasily Levchenko 71da52456e linux build fix: on linux we need to set LD_LIBRARY_PATH to launch jvm with native dependency to llvm 2016-10-05 16:19:54 +03:00
Svyatoslav Scherbina 38d0000242 backend.native: simplify build.gradle by making it more idiomatic 2016-10-05 08:28:47 +03:00
Svyatoslav Scherbina e464989b1b backend.native: simplify build.gradle after improving Interop plugin 2016-10-04 16:32:15 +03:00
Svyatoslav Scherbina 33bfb2d063 Interop: improve support for multiple source sets in Gradle plugin 2016-10-04 16:25:18 +03:00
Svyatoslav Scherbina ba69e02ea6 backend.native: enable assertions 2016-10-04 14:26:06 +07:00
Vasily Levchenko fd2288c23f makes idea users more happy: fix dependencies to let idea build project correctly 2016-10-03 11:39:57 +03:00
Vasily Levchenko d61bb4a6e5 add dependency to generated classes 2016-09-29 17:55:43 +03:00
Vasily Levchenko b1e89a4d41 backend.native and generated dependencies resolving 2016-09-29 17:49:14 +03:00