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,
|
||||
const char *Triple) {
|
||||
unwrap(M)->setTargetTriple(Triple::normalize(Triple));
|
||||
const char *Target) {
|
||||
#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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue