diff options
| author | bors <bors@rust-lang.org> | 2025-02-26 06:21:59 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-02-26 06:21:59 +0000 |
| commit | 2b3cef882aa9085db417837ac6152463060f1f8a (patch) | |
| tree | f8ea08fdc6df4a7473059bfe532540f7d443ea69 /compiler/rustc_codegen_llvm/src/llvm_util.rs | |
| parent | a46c755c6ad2c9543a836a1ca134178b2345acc2 (diff) | |
| parent | 1bb43192a2024e6d3c3c16afc7d42554efdbef89 (diff) | |
| download | rust-2b3cef882aa9085db417837ac6152463060f1f8a.tar.gz rust-2b3cef882aa9085db417837ac6152463060f1f8a.zip | |
Auto merge of #137651 - fmease:rollup-s3s7m6f, r=fmease
Rollup of 14 pull requests Successful merges: - #136576 (pass optimization level to llvm-bitcode-linker) - #137154 (Add UTF-8 validation fast paths in `Wtf8Buf`) - #137311 (Enable `f16` for MIPS) - #137320 (fix(rustdoc): Fixed stability version in rustdoc) - #137529 (remove few unused args) - #137544 (tests: Add regression test for derive token invalidation (#81099)) - #137559 (run some tests on emscripten again) - #137601 (ssa/mono: deduplicate `type_has_metadata`) - #137603 (codegen_llvm: avoid `Deref` impls w/ extern type) - #137604 (trait_sel: resolve vars in host effects) - #137609 (Complete the list of resources used in rustdoc output) - #137613 (hir_analysis: skip self type of host effect preds in variances_of) - #137614 (fix doc in library/core/src/pin.rs) - #137622 (fix attribute-related ICE when parsing macro on the rhs of a name-value attribute) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_codegen_llvm/src/llvm_util.rs')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/llvm_util.rs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/compiler/rustc_codegen_llvm/src/llvm_util.rs b/compiler/rustc_codegen_llvm/src/llvm_util.rs index 1fcb20e0d7b..5cc4f4ab9e6 100644 --- a/compiler/rustc_codegen_llvm/src/llvm_util.rs +++ b/compiler/rustc_codegen_llvm/src/llvm_util.rs @@ -331,7 +331,8 @@ pub(crate) fn target_features_cfg(sess: &Session, allow_unstable: bool) -> Vec<S if let Some(feat) = to_llvm_features(sess, feature) { for llvm_feature in feat { let cstr = SmallCStr::new(llvm_feature); - if !unsafe { llvm::LLVMRustHasFeature(&target_machine, cstr.as_ptr()) } { + if !unsafe { llvm::LLVMRustHasFeature(target_machine.raw(), cstr.as_ptr()) } + { return false; } } @@ -453,8 +454,8 @@ pub(crate) fn print(req: &PrintRequest, out: &mut String, sess: &Session) { require_inited(); let tm = create_informational_target_machine(sess, false); match req.kind { - PrintKind::TargetCPUs => print_target_cpus(sess, &tm, out), - PrintKind::TargetFeatures => print_target_features(sess, &tm, out), + PrintKind::TargetCPUs => print_target_cpus(sess, tm.raw(), out), + PrintKind::TargetFeatures => print_target_features(sess, tm.raw(), out), _ => bug!("rustc_codegen_llvm can't handle print request: {:?}", req), } } |
