Skip to content

Commit 9a2deab

Browse files
committed
fix: aarch64-gnu-llvm-20-1
1 parent 291f9e6 commit 9a2deab

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

compiler/rustc_codegen_llvm/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ bitflags = "2.4.1"
1414
gimli = "0.31"
1515
itertools = "0.12"
1616
libc = "0.2"
17-
libloading = "0.9.0"
17+
libloading = { version = "0.9.0", optional = true }
1818
measureme = "12.0.1"
1919
object = { version = "0.37.0", default-features = false, features = ["std", "read"] }
2020
rustc-demangle = "0.1.21"
@@ -47,6 +47,6 @@ tracing = "0.1"
4747
[features]
4848
# tidy-alphabetical-start
4949
check_only = ["rustc_llvm/check_only"]
50-
llvm_enzyme = []
50+
llvm_enzyme = ["dep:libloading"]
5151
# tidy-alphabetical-end
5252

compiler/rustc_codegen_llvm/src/llvm/enzyme_ffi.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,6 +451,7 @@ pub(crate) use self::Fallback_AD::*;
451451
pub(crate) mod Fallback_AD {
452452
#![allow(unused_variables)]
453453

454+
use std::ffi::c_void;
454455
use std::sync::Mutex;
455456

456457
use libc::c_char;
@@ -459,7 +460,9 @@ pub(crate) mod Fallback_AD {
459460

460461
use super::{CConcreteType, CTypeTreeRef, Context, EnzymeTypeTree};
461462

462-
pub(crate) struct EnzymeWrapper;
463+
pub(crate) struct EnzymeWrapper {
464+
pub registerEnzymeAndPassPipeline: *const c_void,
465+
}
463466

464467
impl EnzymeWrapper {
465468
pub(crate) fn init<'a, B: WriteBackendMethods>(

0 commit comments

Comments
 (0)