diff options
| author | bors <bors@rust-lang.org> | 2025-03-08 03:19:34 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-03-08 03:19:34 +0000 |
| commit | 20f0108ada90e37c2350ad68fdc6afe56f51539d (patch) | |
| tree | c842cd31aaf30aff8cbf5bf16f97013bad4e789e /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | |
| parent | f5a1ef7121ad661b5a21a1d02941c8064d54ee0b (diff) | |
| parent | dad4c8b6a97e872b22732009f59afce5b5c631a3 (diff) | |
| download | rust-20f0108ada90e37c2350ad68fdc6afe56f51539d.tar.gz rust-20f0108ada90e37c2350ad68fdc6afe56f51539d.zip | |
Auto merge of #138202 - jhpratt:rollup-kqrl5xn, r=jhpratt
Rollup of 12 pull requests Successful merges: - #137337 (Add verbatim linker to AIXLinker) - #137363 (compiler: factor Windows x86-32 ABI impl into its own file) - #137537 (Prevent `rmake.rs` from using unstable features, and fix 3 run-make tests that currently do) - #137606 (add a "future" edition) - #137957 (Remove i586-pc-windows-msvc) - #138000 (atomic: clarify that failing conditional RMW operations are not 'writes') - #138013 (Add post-merge analysis CI workflow) - #138033 (rustdoc: Add attribute-related tests for rustdoc JSON.) - #138137 (setTargetTriple now accepts Triple rather than string) - #138173 (Delay bug for negative auto trait rather than ICEing) - #138184 (Allow anyone to relabel `CI-spurious-*`) - #138187 (remove clones) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
| -rw-r--r-- | compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp index aea2a8dd097..53df59930f4 100644 --- a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp @@ -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) { |
