We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b74da96 commit 4e4bed8Copy full SHA for 4e4bed8
compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
@@ -153,7 +153,11 @@ extern "C" LLVMContextRef LLVMRustContextCreate(bool shouldDiscardNames) {
153
154
extern "C" void LLVMRustSetNormalizedTarget(LLVMModuleRef M,
155
const char *Triple) {
156
+#if LLVM_VERSION_GE(21, 0)
157
+ unwrap(M)->setTargetTriple(llvm::Triple(Triple::normalize(Triple)));
158
+#else
159
unwrap(M)->setTargetTriple(Triple::normalize(Triple));
160
+#endif
161
}
162
163
extern "C" void LLVMRustPrintPassTimings(RustStringRef OutBuf) {
0 commit comments