How on Mac through Gradle to make build for Linux?...
# kotlin-native
b
How on Mac through Gradle to make build for Linux?
gradle build
only do macos_x64
Copy code
apply plugin: 'konan'

konan.targets = [ 'macbook', 'linux' ]

konanArtifacts {
  program("app") {
    enableOptimizations(true)
  }
}
b
Unless the indication
konan.targets = ['macbook', 'linux']
should not create at once two artifacts? and for macbook and for linux ... https://kotlinlang.org/docs/reference/native/gradle_plugin.html#building-for-different-targets
I expected the same behavior as Go does - just specify the target platform for which the compilation is done and on the output we get the executable application for this platform
t
cross-compiatoin from osx to linux is not supported as I understand
s
@thevery Where should I file something against supporting running tests for the multiplatform plugin? Nothing I've done seems to work
looks like
compilations.test.outputKinds('EXECUTABLE')
doesn't work yet
b
Sadly. We’ll have to keep three operating systems to compile 😞
o
you can implement cross build mac -> linux and contribute patch to K/N, it’s fully feasible, just needs Linux linker binary runnable on mac
👍 1
same with other pairs, but cross-compilation to Mac unlikely will work for both technical and legal reasons