https://kotlinlang.org logo
Title
s

salomonbrys

12/12/2017, 1:29 PM
Hi there, is there a way to cross-compile a KLib for to the ios and macbook targets from a linux host ?
g

gildor

12/12/2017, 2:00 PM
You cannot compile for iOS/macOS on linux, only on mac
o

olonho

12/12/2017, 2:08 PM
Correct, no cross-compilation to Apple targets from other hosts.
s

salomonbrys

12/12/2017, 2:10 PM
OK, thanks !
g

gildor

12/12/2017, 2:13 PM
I’m curious. Is it impossible only because all platform libraries are mac only or even toolchain to build is not available? As I understand you can build something to llvm bitcode that compatible with iOS/macOS
m

msink

12/12/2017, 3:09 PM
It's possibe technically, but illegal. Well, maybe legal for personal use, but not in general. See https://github.com/tpoechtrager/osxcross
o

olonho

12/12/2017, 3:12 PM
Well, it’s not absolutely impossible, we just need to have tools like Apple linker and startup files to create proper binaries.
n

napperley

12/12/2017, 9:12 PM
There are some workarounds available for compiling and running Mac sw (incl iOS). One possible option is macincloud: https://www.macincloud.com/