Skip to content

Commit

Permalink
Unrolled build for rust-lang#138137
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#138137 - ZequanWu:fix-triple, r=cuviper

setTargetTriple now accepts Triple rather than string

llvm/llvm-project#129868 updated `setTargetTriple`
  • Loading branch information
rust-timer authored Mar 8, 2025
2 parents f5a1ef7 + 8814679 commit 558ab23
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 558ab23

Please sign in to comment.