From 943fcab72051cb43dd820d5a3e0867747b1bad37 Mon Sep 17 00:00:00 2001 From: Pavel Punegov Date: Mon, 17 Feb 2020 15:00:55 +0300 Subject: [PATCH] Move linkerOpts to def file as this option is not supported by cinterop. --- backend.native/tests/build.gradle | 8 +------- backend.native/tests/interop/objc/msg_send/messaging.def | 3 ++- backend.native/tests/interop/objc/objcSmoke.def | 1 + .../tests/interop/objc_with_initializer/objc_misc.def | 1 + 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/backend.native/tests/build.gradle b/backend.native/tests/build.gradle index 2c97b6c6244..6d5853d2a9e 100644 --- a/backend.native/tests/build.gradle +++ b/backend.native/tests/build.gradle @@ -3357,19 +3357,16 @@ if (PlatformInfo.isAppleTarget(project)) { createInterop("objcSmoke") { it.defFile 'interop/objc/objcSmoke.def' it.headers "$projectDir/interop/objc/smoke.h" - it.linkerOpts "-L$buildDir", "-lobjcsmoke" } createInterop("objcMisc") { it.defFile 'interop/objc_with_initializer/objc_misc.def' it.headers "$projectDir/interop/objc_with_initializer/objc_misc.h" - it.linkerOpts "-L$buildDir", "-lobjcmisc" } createInterop("objcMessaging") { it.defFile 'interop/objc/msg_send/messaging.def' it.headers "$projectDir/interop/objc/msg_send/messaging.h" - it.linkerOpts "-L$buildDir", "-lobjcmessaging" } createInterop("objcKt34467") { @@ -3381,7 +3378,6 @@ if (PlatformInfo.isAppleTarget(project)) { createInterop("objcGh3343") { it.defFile 'framework/gh3343/objclib.def' it.headers "$projectDir/framework/gh3343/objclib.h" - it.linkerOpts "-L$buildDir" } } @@ -3403,15 +3399,13 @@ Task interopTest(String name, Closure configureClosure) { UtilsKt.sameDependenciesAs(libTask, task as KonanInteropTest) task.dependsOn(libTask) - def lnOpts = (project.tasks.getByName(libTask)).linkerOpts - program(name, targets: [target.name]) { libraries { artifact lib } srcFiles task.getSources() baseDir "$testOutputLocal/$name" - if (lnOpts != null) linkerOpts(lnOpts) + linkerOpts "-L$buildDir" extraOpts task.flags extraOpts project.globalTestArgs } diff --git a/backend.native/tests/interop/objc/msg_send/messaging.def b/backend.native/tests/interop/objc/msg_send/messaging.def index 7161e3ce585..c1aab35b013 100644 --- a/backend.native/tests/interop/objc/msg_send/messaging.def +++ b/backend.native/tests/interop/objc/msg_send/messaging.def @@ -1,2 +1,3 @@ language = Objective-C -headerFilter = **/messaging.h \ No newline at end of file +headerFilter = **/messaging.h +linkerOpts = -lobjcmessaging \ No newline at end of file diff --git a/backend.native/tests/interop/objc/objcSmoke.def b/backend.native/tests/interop/objc/objcSmoke.def index 577fdcbbac2..7337fd643a2 100644 --- a/backend.native/tests/interop/objc/objcSmoke.def +++ b/backend.native/tests/interop/objc/objcSmoke.def @@ -2,3 +2,4 @@ language = Objective-C headers = Foundation/NSArray.h Foundation/NSValue.h Foundation/NSString.h Foundation/NSStream.h Foundation/NSBundle.h headerFilter = **/smoke.h Foundation/NSArray.h Foundation/NSValue.h Foundation/NSString.h Foundation/NSStream.h \ objc/objc.h Foundation/NSBundle.h +linkerOpts = -lobjcsmoke diff --git a/backend.native/tests/interop/objc_with_initializer/objc_misc.def b/backend.native/tests/interop/objc_with_initializer/objc_misc.def index 24ed97ef215..df262119679 100644 --- a/backend.native/tests/interop/objc_with_initializer/objc_misc.def +++ b/backend.native/tests/interop/objc_with_initializer/objc_misc.def @@ -1,4 +1,5 @@ language = Objective-C headers = Foundation/NSArray.h Foundation/NSValue.h Foundation/NSString.h headerFilter = **/objc_misc.h Foundation/NSArray.h Foundation/NSValue.h Foundation/NSString.h +linkerOpts = -lobjcmisc