Native: support compileBitcodeWithXcodeLlvm=false binary option
This option makes the compiler use Kotlin/Native-provided LLVM instead of Xcode-provided LLVM when compiling bitcode to machine code for Apple targets. ^KT-54799 Fixed
This commit is contained in:
committed by
Space Team
parent
1aa3e54459
commit
f5532abd11
+2
@@ -50,6 +50,8 @@ object BinaryOptions : BinaryOptionRegistry() {
|
|||||||
val mimallocUseDefaultOptions by booleanOption()
|
val mimallocUseDefaultOptions by booleanOption()
|
||||||
|
|
||||||
val mimallocUseCompaction by booleanOption()
|
val mimallocUseCompaction by booleanOption()
|
||||||
|
|
||||||
|
val compileBitcodeWithXcodeLlvm by booleanOption()
|
||||||
}
|
}
|
||||||
|
|
||||||
open class BinaryOption<T : Any>(
|
open class BinaryOption<T : Any>(
|
||||||
|
|||||||
+1
-1
@@ -71,7 +71,7 @@ internal class BitcodeCompiler(
|
|||||||
}
|
}
|
||||||
val bitcodePath = bitcodeFile.absoluteFile.normalize().path
|
val bitcodePath = bitcodeFile.absoluteFile.normalize().path
|
||||||
val objectPath = objectFile.absoluteFile.normalize().path
|
val objectPath = objectFile.absoluteFile.normalize().path
|
||||||
if (configurables is AppleConfigurables) {
|
if (configurables is AppleConfigurables && config.configuration.get(BinaryOptions.compileBitcodeWithXcodeLlvm) != false) {
|
||||||
targetTool("clang++", *flags.toTypedArray(), bitcodePath, "-o", objectPath)
|
targetTool("clang++", *flags.toTypedArray(), bitcodePath, "-o", objectPath)
|
||||||
} else {
|
} else {
|
||||||
hostLlvmTool("clang++", *flags.toTypedArray(), bitcodePath, "-o", objectPath)
|
hostLlvmTool("clang++", *flags.toTypedArray(), bitcodePath, "-o", objectPath)
|
||||||
|
|||||||
Reference in New Issue
Block a user