[K/N] Separate ClangArgs for jni and native
Since LLVM for Windows is now native instead on MinGW, we have to compile code in a different environment in case of JNI. This commits just separates ClangArgs into two subclasses without actual behavior changes.
This commit is contained in:
@@ -28,8 +28,6 @@ val llvmDir = project.findProperty("llvmDir")
|
||||
|
||||
native {
|
||||
val obj = if (HostManager.hostIsMingw) "obj" else "o"
|
||||
val host = rootProject.project(":kotlin-native").extra["hostName"]
|
||||
val hostLibffiDir = rootProject.project(":kotlin-native").extra["${host}LibffiDir"]
|
||||
val cxxflags = mutableListOf(
|
||||
"--std=c++17",
|
||||
"-I${llvmDir}/include",
|
||||
@@ -37,7 +35,7 @@ native {
|
||||
)
|
||||
suffixes {
|
||||
(".cpp" to ".$obj") {
|
||||
tool(*platformManager.hostPlatform.clang.clangCXX("").toTypedArray())
|
||||
tool(*platformManager.hostPlatform.clangForJni.clangCXX("").toTypedArray())
|
||||
flags(*cxxflags.toTypedArray(), "-c", "-o", ruleOut(), ruleInFirst())
|
||||
}
|
||||
|
||||
@@ -50,7 +48,7 @@ native {
|
||||
val objSet = sourceSets["main"]!!.transform(".cpp" to ".$obj")
|
||||
|
||||
target(lib("debugInfo"), objSet) {
|
||||
tool(*platformManager.hostPlatform.clang.llvmAr("").toTypedArray())
|
||||
tool(*platformManager.hostPlatform.clangForJni.llvmAr("").toTypedArray())
|
||||
flags("-qv", ruleOut(), *ruleInAll())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user