Skip to content

Commit

Permalink
Fix macOS llvm directory
Browse files Browse the repository at this point in the history
  • Loading branch information
Martmists-GH authored Jul 19, 2024
1 parent 667a8dc commit eab472f
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@file:Suppress("INVISIBLE_REFERENCE", "INVISIBLE_MEMBER")
import org.jetbrains.kotlin.compilerRunner.konanHome
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget

plugins {
Expand Down Expand Up @@ -87,16 +85,10 @@ kotlin {
}

if (target.name.startsWith("macos")) {
extraOpts("-Xsource-compiler-option", "-isystem~/.konan/dependencies/llvm-11.1.0-macos-${if (System.getProperty("os.arch") in arrayOf("amd64", "x86_64")) "x64" else "aarch64"}-essentials")
extraOpts("-Xsource-compiler-option", "-isystem~/.konan/dependencies/apple-llvm-20200714-macos-${if (System.getProperty("os.arch") in arrayOf("amd64", "x86_64")) "x64" else "aarch64"}-essentials")
extraOpts("-Xsource-compiler-option", "-isysroot/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk")
}

@Suppress("INVISIBLE_MEMBER")
println(konanHome)

println(target.konanTarget)
println(target.konanTarget.visibleName)

val cppSource = projectDir.resolve("src/lib/cpp").listFiles().filter { it.extension == "cpp" }.map { it.absolutePath }
cppSource.forEach {
extraOpts("-Xcompile-source", it)
Expand Down

0 comments on commit eab472f

Please sign in to comment.