Commit Graph

36 Commits

Author SHA1 Message Date
Vasily Levchenko 8121e83400 [build][warning] enable GRADLE_METADATA to avoid konan gradle plugins warnings 2018-05-09 08:54:52 +03:00
Ilya Matveev bee7dcd704 Fix gradle plugin versioning and the plugin version used by samples 2018-04-26 11:34:45 +07:00
Ilya Matveev 5ab7296ceb [build] Support composite build with Kotlin/JVM 2018-03-13 19:17:38 +03:00
Alexander Gorshenev f703877160 Introduced support for javascript Math and Kotlin Double to WASM32.
Implemented jsinterop tool for interaction with js math.
2018-01-19 13:46:53 +03:00
Ilya Matveev 1f74f4dc6d [build] Specify group and version in 'shared' project 2018-01-17 16:58:44 +07:00
Ilya Matveev f409287438 [build] Improve composite build 2018-01-17 16:58:44 +07:00
Ilya Matveev ffad72835e [build] Use kotlin-gradle plugin in platform libs build 2018-01-17 16:58:44 +07:00
Ilya Matveev a2b6c71f73 [build] Move shared and gradle-plugin into separate gradle builds
Platform libs build will be changed by a separate commit
2018-01-17 16:58:44 +07:00
Aleksey Kladov 9f9f34d2a3 [debug] make test module name more specific 2017-10-27 11:28:39 +03:00
Aleksey Kladov 2b6c284ff8 [compiletest]: add JUnit4-based infrastructure for testing compiler 2017-10-27 11:28:39 +03:00
Ilya Matveev 4c3016d21b unit-tests: Minor fixes before review 2017-09-25 11:31:22 +03:00
Vasily Levchenko f26e5b5f02 unit-tests: Create a simple test runner implementation 2017-09-25 11:31:22 +03:00
Vasily Levchenko 403c774688 [performance] compilation and execution with kotlin native and jvm, comparing results 2017-08-29 16:48:38 +03:00
Ilya Matveev 60ed6f6871 dependencies: Move dependency downloader into shared project 2017-08-23 19:42:06 +07:00
Svyatoslav Scherbina a38835cb46 Extend libclang API 2017-08-16 10:04:23 +03:00
Ilya Matveev 73b172f32d perf: Move benchmarks to separate gradle build
This patch separates the benchmark Gradle build from the root one.
It allows us to use the latest (built from sources) Gradle
plugin to compile the benchmarks instead of the released one.
2017-08-10 11:42:01 +07:00
Konstantin Anisimov b3fe93cc18 Enable performance testsuite 2017-08-03 18:21:49 +07:00
alexander-gorshenev d3c24bb387 Different extensions (and KonanTarget communalization). (#665) 2017-06-19 12:45:57 +03:00
Alexander Gorshenev 646117a60b Initial klib tool check in. 2017-06-08 03:28:18 +03:00
Alexander Gorshenev fe5945aebe Using a single shell script for both 'cinterop' and 'konanc'. 2017-06-08 03:28:18 +03:00
Svyatoslav Scherbina 037580fbb7 Remove outdated InteropExample project 2017-06-06 11:32:23 +03:00
Ilya Matveev 862c68b5c5 Gradle plugin: fix --include-build workflow
By convention, gradle uses project name as artifactId, `project.group`
property for groupId and `project.version` for version.

This commit switches to this convention instead of configuring
publication tasks directly. It allows to easily substitute published
plugin with a plugin build locally by issuing

`./gradlew build --include-build ../kotlin-native`

in the dependent project.
2017-05-25 15:11:50 +07:00
Nikolay Igotti 772e8a33ae Revert "Gradle plugin: fix --include-build workflow"
This reverts commit fce134ee56.
2017-05-24 19:32:25 +03:00
Aleksey Kladov fce134ee56 Gradle plugin: fix --include-build workflow
By convention, gradle uses project name as artifactId, `project.group`
property for groupId and `project.version` for version.

This commit switches to this convention instead of configuring
publication tasks directly. It allows to easily substitute published
plugin with a plugin build locally by issuing

`./gradlew build --include-build ../kotlin-native`

in the dependent project.
2017-05-24 19:35:41 +07:00
Vasily Levchenko 89ebbaeb6c DEBUGINFO: initial C bindings to debug info llvm
- support DICompileUnit
- support DIFIle
- support DISubroutine
- support DIBasicType
- support DILocation
- added gradle build
- debug info bindings are involved in kotlin build
- added binding to DIGetSubprogramLinkName
- added binding to LLVMBuilderGetCurrentFunction
- added reset location
- simple demo added (buildable with gradle)
  produces folowing output:
    Following pseudo code in sources.
     0:123456789012345678901
     1: fun main():Int {
     2:   {foo()}()
     3:   return 0
     4: }
     5  fun foo() {}

    0:b-backend-dwarf:minamoto@unit-703(0)# ./demo
    ; ModuleID = 'test'
    source_filename = "test"

    define i32 @foo(i32) !dbg !3 {
    entry:
      ret i32 %0, !dbg !7
    }

    !llvm.dbg.cu = !{!0}

    !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "konanc", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
    !1 = !DIFile(filename: "1.kt", directory: "src")
    !2 = !{}
    !3 = distinct !DISubprogram(name: "foo", linkageName: "foo:link", scope: null, file: !1, line: 66, type: !4, isLocal: false, isDefinition: true, isOptimized: false, unit: !0, variables: !2)
    !4 = !DISubroutineType(types: !5)
    !5 = !{!6}
    !6 = !DIBasicType(name: "int", size: 32, align: 4)
    !7 = !DILocation(line: 42, column: 15, scope: !3)
- demo sharing debug information between several bitcode artifacts
    0:b-backend-dwarf:minamoto@unit-703(0)# llvmDebugInfoC/build/exe/demogenerated/demogenerated
    ; ModuleID = 'test'
    source_filename = "test"

    define void @foo() !dbg !3 {
    entry:
      ret void, !dbg !5
    }

    define void @"main$caller$foo"() !dbg !6 {
    entry:
      call void @foo(), !dbg !7
      ret void
    }

    define void @main() !dbg !8 {
    entry:
      call void @"main$caller$foo"(), !dbg !9
      ret void, !dbg !10
    }

    !llvm.dbg.cu = !{!0}

    !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "konanc", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
    !1 = !DIFile(filename: "<stdin>", directory: "")
    !2 = !{}
    !3 = distinct !DISubprogram(name: "foo", linkageName: "foo", scope: null, file: !1, line: 5, type: !4, isLocal: false, isDefinition: true, isOptimized: false, unit: !0, variables: !2)
    !4 = !DISubroutineType(types: !2)
    !5 = !DILocation(line: 5, column: 14, scope: !3)
    !6 = distinct !DISubprogram(name: "main$caller$foo", linkageName: "main$caller$foo", scope: null, file: !1, line: 2, type: !4, isLocal: false, isDefinition: true, isOptimized: false, unit: !0, variables: !2)
    !7 = !DILocation(line: 5, column: 2, scope: !6)
    !8 = distinct !DISubprogram(name: "main", linkageName: "main", scope: null, file: !1, line: 1, type: !4, isLocal: false, isDefinition: true, isOptimized: false, unit: !0, variables: !2)
    !9 = !DILocation(line: 2, column: 12, scope: !8)
    !10 = !DILocation(line: 3, column: 4, scope: !8)
- local variables support
- demo for local variable suppor (TBD some out put here).
    ; ModuleID = 'test'
    source_filename = "test"

    define i32 @main() !dbg !3 {
    entry:
    %0 = alloca i32
    call void @llvm.dbg.declare(metadata i32* %0, metadata !5, metadata !7), !dbg !8
    store i32 42, i32* %0, !dbg !8
    %1 = load i32, i32* %0, !dbg !8
    ret i32 %1, !dbg !8
    }

    ; Function Attrs: nounwind readnone
    declare void @llvm.dbg.declare(metadata, metadata, metadata) #0

    attributes #0 = { nounwind readnone }

    !llvm.dbg.cu = !{!0}

    !0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, producer: "konanc", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !2)
    !1 = !DIFile(filename: "<stdin>", directory: "")
    !2 = !{}
    !3 = distinct !DISubprogram(name: "main", linkageName: "main", scope: null, file: !1, line: 1, type: !4, isLocal: false, isDefinition: true, isOptimized: false, unit: !0, variables: !2)
    !4 = !DISubroutineType(types: !2)
    !5 = !DILocalVariable(name: "a", scope: !3, file: !1, line: 2, type: !6)
    !6 = !DIBasicType(name: "int", size: 32, align: 4)
    !7 = !DIExpression()
    !8 = !DILocation(line: 2, column: 1, scope: !3)
2017-04-14 11:39:51 +03:00
Ilya Matveev c6680f0735 Add gradle plugin with simple DSL for Compilator and Stub generator 2017-03-31 18:46:25 +07:00
Nikolay Igotti 0cbd34086e Added JB copyright (#417) 2017-03-30 09:51:58 +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
Ilya Matveev 7285c57cd8 backend/tests: Generate external test tasks in config stage
We generate tasks for external tests group during Gradle's configuration
phase instead of using separate task (regenerate_external_tests)
2017-01-25 17:24:36 +03:00
Ilya Matveev fd44baf2c0 backend/tests: Infrastructure for external test running 2017-01-20 14:04:04 +03:00
Vasily Levchenko a4dd4c241a gradle replacement for Makefile in tests 2016-10-26 13:12:22 +03:00
Svyatoslav Scherbina 7ed9d9c633 build: implement downloading (native) dependencies from the JFrog repo 2016-10-17 17:35:57 +03:00
Svyatoslav Scherbina f30c840d1c runtime: move hash functions to newly created subproject
to reuse in compiler
2016-10-13 17:29:02 +03:00
Svyatoslav Scherbina 5dc871ec32 runtime: add TypeInfo struct definition
also add runtime as Gradle subproject producing bitcode
2016-09-29 17:41:54 +07:00
Vasily Levchenko 89d6c24f56 HEAD UP!
The gradle.property contains the version of the kotlin kotlin_version, previously it was used for holding llvmInstallPath, now this variable should be defined in local.property
2016-09-28 16:08:44 +03:00
Vasily Levchenko 0eaaa58ed9 HEAD UPS! Global move: experiments -> kotlin-native 2016-09-28 13:22:36 +03:00