Rollup merge of #138137 - ZequanWu:fix-triple, r=cuviper
setTargetTriple now accepts Triple rather than string https://github.com/llvm/llvm-project/pull/129868 updated `setTargetTriple`
This commit is contained in:
commit
b16047780d
1 changed files with 6 additions and 2 deletions
|
@ -152,8 +152,12 @@ extern "C" LLVMContextRef LLVMRustContextCreate(bool shouldDiscardNames) {
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" void LLVMRustSetNormalizedTarget(LLVMModuleRef M,
|
extern "C" void LLVMRustSetNormalizedTarget(LLVMModuleRef M,
|
||||||
const char *Triple) {
|
const char *Target) {
|
||||||
unwrap(M)->setTargetTriple(Triple::normalize(Triple));
|
#if LLVM_VERSION_GE(21, 0)
|
||||||
|
unwrap(M)->setTargetTriple(Triple(Triple::normalize(Target)));
|
||||||
|
#else
|
||||||
|
unwrap(M)->setTargetTriple(Triple::normalize(Target));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
extern "C" void LLVMRustPrintPassTimings(RustStringRef OutBuf) {
|
extern "C" void LLVMRustPrintPassTimings(RustStringRef OutBuf) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue