Created
March 7, 2020 20:14
-
-
Save junlarsen/a026e9b66ca090783a90f97bd37bf741 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val triple = LLVM.LLVMGetDefaultTargetTriple() | |
val target = LLVM.LLVMGetFirstTarget() | |
val cpu = BytePointer("generic") | |
val features = BytePointer("") | |
val machine = LLVM.LLVMCreateTargetMachine(target, triple.string, cpu.string, features.string, 0, 0 ,0) | |
LLVM.LLVMSetModuleDataLayout(mod, LLVM.LLVMCreateTargetDataLayout(machine)) | |
LLVM.LLVMSetTarget(mod, triple) | |
LLVM.LLVMTargetMachineEmitToFile(machine, mod, BytePointer("output.o"), LLVM.LLVMObjectFile, BytePointer()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment