A test to check we don't throw away a library dependency only because it
it a default lib not needed in the main program.
This commit is contained in:
committed by
alexander-gorshenev
parent
e7286998aa
commit
2445357166
@@ -1227,6 +1227,12 @@ task link_default_libs(type: RunKonanTest) {
|
|||||||
source = "link/default/default.kt"
|
source = "link/default/default.kt"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
task no_purge_for_dependencies(type: LinkKonanTest) {
|
||||||
|
goldValue = "linked library\nand symbols from posix available: 17; 1.0\n"
|
||||||
|
source = "link/purge1/prog.kt"
|
||||||
|
lib = "link/purge1/lib.kt"
|
||||||
|
}
|
||||||
|
|
||||||
task for0(type: RunKonanTest) {
|
task for0(type: RunKonanTest) {
|
||||||
goldValue = "2\n3\n4\n"
|
goldValue = "2\n3\n4\n"
|
||||||
source = "runtime/basic/for0.kt"
|
source = "runtime/basic/for0.kt"
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
import platform.posix.*
|
||||||
|
|
||||||
|
fun foo() {
|
||||||
|
println("linked library")
|
||||||
|
val size: size_t = 17L
|
||||||
|
val e = fabs(1.toDouble())
|
||||||
|
println("and symbols from posix available: $size; $e")
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
|
||||||
|
fun main(args: Array<String>) {
|
||||||
|
foo()
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user