ivan.savytskyi
03/13/2019, 8:27 PMlinkerOpts
for compilation tests? in MPP project (MPP gradle plugin)
If I do this:
def iosPreset = findProperty("kn.ios.target") == "arm" ? presets.iosArm64 : presets.iosX64
fromPreset(iosPreset, 'ios') {
compilations.all {
kotlinOptions.freeCompilerArgs = ["-Xverbose-phases=linker"]
outputKinds('FRAMEWORK')
linkerOpts "-F./libs"
I’m getting error llvm-lto: error: Linking globals named 'ktype:com.greeter.NSObjectProtocolMeta': symbol multiply defined!
Is there any way I can provide linkerOpts
for test compilationconfigure([targets["ios"]]) {
compilations.test {
kotlinOptions.freeCompilerArgs = ["-Xverbose-phases=linker"]
linkerOpts "-F./libs"
}
}
basher
03/13/2019, 8:58 PMafterEvaluate {
kotlin {
targets.all {
compilations.all {
// can't use compilations.test because not all "compilations" have a test variant
if (name == 'test') {
kotlinOptions {
freeCompilerArgs = ['-Xuse-experimental=kotlin.Experimental']
}
}
}
}
}
}
i think i had to do it this way for the reason noted in the comments