quick question: in `~/.konan/dependencies` I can s...
# kotlin-native
a
quick question: in
~/.konan/dependencies
I can see
x86_64-unknown-linux-gnu-gcc-8.3.0-glibc-2.19-kernel-4.9-2
for Linux and
msys2-mingw-w64-x86_64-2
for Windows. Can someone with a Mac tell me what the macOS equivalent is? I'm trying to work out the directory with the gcc for each platform
Copy code
// build.gradle.kts
import org.jetbrains.kotlin.konan.target.HostManager
import org.jetbrains.kotlin.konan.target.HostManager.Companion.hostIsLinux
import org.jetbrains.kotlin.konan.target.HostManager.Companion.hostIsMac
import org.jetbrains.kotlin.konan.target.HostManager.Companion.hostIsMingw

val konanHostBin = when {
  hostIsMingw -> "dependencies/msys2-mingw-w64-x86_64-2/bin"
  hostIsMac   -> TODO("what's the Mac dir?")
  hostIsLinux -> "dependencies/x86_64-unknown-linux-gnu-gcc-8.3.0-glibc-2.19-kernel-4.9-2/bin"
  else        -> {
    logger.warn("Unknown host family ${HostManager.host.family}")
    null
  }
}
j
This is what I've got in
~/.konan/dependencies
on my Mac.
Looks like
clang-llvm-apple-8.0.0-darwin-macos
is probably the one you're looking for.
a
wonderful, thanks
👌🏼 1
o
at my side I don't have
...apple-8...
🙂 Still I build for ALL K/N targets from mac and, there is no GCC for apple targets there AFAIR - only clang (which is in
apple-llvm-...
BTW, why do you need specifically GCC path?
a
hmm strange...
I want to build a C library, and afaik that requires the specific gcc that Kotlin Konan uses which isn't easily downloadable. I'm on a Windows machine right now and the gcc inside
dependencies/msys2-mingw-w64-x86_64-2/bin
is working
o
Yeah, it should work, but for apple targets, you will need to use clang from llvm
a
that's a problem for future me :)
j
Interesting, maybe that directory is specific to x64 Mac? And yeah, there's no gcc there. I just quick scanned and that directory looked the most similar with a bin subdirectory. It does have clang.