mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user