Move linkerOpts to def file as this option is not supported by cinterop.

This commit is contained in:
Pavel Punegov
2020-02-17 15:00:55 +03:00
committed by Pavel Punegov
parent 0425826fe8
commit 943fcab720
4 changed files with 5 additions and 8 deletions
+1 -7
View File
@@ -3357,19 +3357,16 @@ if (PlatformInfo.isAppleTarget(project)) {
createInterop("objcSmoke") { createInterop("objcSmoke") {
it.defFile 'interop/objc/objcSmoke.def' it.defFile 'interop/objc/objcSmoke.def'
it.headers "$projectDir/interop/objc/smoke.h" it.headers "$projectDir/interop/objc/smoke.h"
it.linkerOpts "-L$buildDir", "-lobjcsmoke"
} }
createInterop("objcMisc") { createInterop("objcMisc") {
it.defFile 'interop/objc_with_initializer/objc_misc.def' it.defFile 'interop/objc_with_initializer/objc_misc.def'
it.headers "$projectDir/interop/objc_with_initializer/objc_misc.h" it.headers "$projectDir/interop/objc_with_initializer/objc_misc.h"
it.linkerOpts "-L$buildDir", "-lobjcmisc"
} }
createInterop("objcMessaging") { createInterop("objcMessaging") {
it.defFile 'interop/objc/msg_send/messaging.def' it.defFile 'interop/objc/msg_send/messaging.def'
it.headers "$projectDir/interop/objc/msg_send/messaging.h" it.headers "$projectDir/interop/objc/msg_send/messaging.h"
it.linkerOpts "-L$buildDir", "-lobjcmessaging"
} }
createInterop("objcKt34467") { createInterop("objcKt34467") {
@@ -3381,7 +3378,6 @@ if (PlatformInfo.isAppleTarget(project)) {
createInterop("objcGh3343") { createInterop("objcGh3343") {
it.defFile 'framework/gh3343/objclib.def' it.defFile 'framework/gh3343/objclib.def'
it.headers "$projectDir/framework/gh3343/objclib.h" it.headers "$projectDir/framework/gh3343/objclib.h"
it.linkerOpts "-L$buildDir"
} }
} }
@@ -3403,15 +3399,13 @@ Task interopTest(String name, Closure<KonanInteropTest> configureClosure) {
UtilsKt.sameDependenciesAs(libTask, task as KonanInteropTest) UtilsKt.sameDependenciesAs(libTask, task as KonanInteropTest)
task.dependsOn(libTask) task.dependsOn(libTask)
def lnOpts = (project.tasks.getByName(libTask)).linkerOpts
program(name, targets: [target.name]) { program(name, targets: [target.name]) {
libraries { libraries {
artifact lib artifact lib
} }
srcFiles task.getSources() srcFiles task.getSources()
baseDir "$testOutputLocal/$name" baseDir "$testOutputLocal/$name"
if (lnOpts != null) linkerOpts(lnOpts) linkerOpts "-L$buildDir"
extraOpts task.flags extraOpts task.flags
extraOpts project.globalTestArgs extraOpts project.globalTestArgs
} }
@@ -1,2 +1,3 @@
language = Objective-C language = Objective-C
headerFilter = **/messaging.h headerFilter = **/messaging.h
linkerOpts = -lobjcmessaging
@@ -2,3 +2,4 @@ language = Objective-C
headers = Foundation/NSArray.h Foundation/NSValue.h Foundation/NSString.h Foundation/NSStream.h Foundation/NSBundle.h 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 \ headerFilter = **/smoke.h Foundation/NSArray.h Foundation/NSValue.h Foundation/NSString.h Foundation/NSStream.h \
objc/objc.h Foundation/NSBundle.h objc/objc.h Foundation/NSBundle.h
linkerOpts = -lobjcsmoke
@@ -1,4 +1,5 @@
language = Objective-C language = Objective-C
headers = Foundation/NSArray.h Foundation/NSValue.h Foundation/NSString.h headers = Foundation/NSArray.h Foundation/NSValue.h Foundation/NSString.h
headerFilter = **/objc_misc.h Foundation/NSArray.h Foundation/NSValue.h Foundation/NSString.h headerFilter = **/objc_misc.h Foundation/NSArray.h Foundation/NSValue.h Foundation/NSString.h
linkerOpts = -lobjcmisc