backend: Place *.bc.o files in a temporary directory for llvmLlc()
This commit is contained in:
+5
-5
@@ -162,12 +162,12 @@ internal class LinkStage(val context: Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun llvmLlc(file: BitcodeFile): ObjectFile {
|
fun llvmLlc(file: BitcodeFile): ObjectFile {
|
||||||
// TODO: Make it a temporary file.
|
val tmpObjectFile = File.createTempFile(File(file).name, ".o")
|
||||||
val objectFile = "$file.o"
|
tmpObjectFile.deleteOnExit()
|
||||||
|
val objectFile = tmpObjectFile.absolutePath
|
||||||
val tool = distribution.llvmLlc
|
val tool = distribution.llvmLlc
|
||||||
val command = listOf(distribution.llvmLlc, "-o", objectFile, "-filetype=obj") +
|
val command = listOf(distribution.llvmLlc, "-o", objectFile, "-filetype=obj") +
|
||||||
properties.propertyList("llvmLlcFlags.$suffix") + listOf(file)
|
properties.propertyList("llvmLlcFlags.$suffix") + listOf(file)
|
||||||
runTool(*command.toTypedArray())
|
runTool(*command.toTypedArray())
|
||||||
|
|
||||||
return objectFile
|
return objectFile
|
||||||
|
|||||||
Reference in New Issue
Block a user