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