[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:
@@ -35,10 +35,10 @@ native {
|
||||
val host = rootProject.project(":kotlin-native").extra["hostName"]
|
||||
val hostLibffiDir = rootProject.project(":kotlin-native").extra["${host}LibffiDir"]
|
||||
val cflags = mutableListOf("-I$hostLibffiDir/include",
|
||||
*platformManager.hostPlatform.clang.hostCompilerArgsForJni)
|
||||
*platformManager.hostPlatform.clangForJni.hostCompilerArgsForJni)
|
||||
suffixes {
|
||||
(".c" to ".$obj") {
|
||||
tool(*platformManager.hostPlatform.clang.clangC("").toTypedArray())
|
||||
tool(*platformManager.hostPlatform.clangForJni.clangC("").toTypedArray())
|
||||
flags( *cflags.toTypedArray(), "-c", "-o", ruleOut(), ruleInFirst())
|
||||
}
|
||||
}
|
||||
@@ -50,7 +50,7 @@ native {
|
||||
val objSet = sourceSets["callbacks"]!!.transform(".c" to ".$obj")
|
||||
|
||||
target(solib("callbacks"), objSet) {
|
||||
tool(*platformManager.hostPlatform.clang.clangCXX("").toTypedArray())
|
||||
tool(*platformManager.hostPlatform.clangForJni.clangCXX("").toTypedArray())
|
||||
flags("-shared",
|
||||
"-o",ruleOut(), *ruleInAll(),
|
||||
"-L${project(":kotlin-native:libclangext").buildDir}",
|
||||
|
||||
Reference in New Issue
Block a user