File tree Expand file tree Collapse file tree 2 files changed +5
-1
lines changed
src/bootstrap/src/core/build_steps Expand file tree Collapse file tree 2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -1174,6 +1174,10 @@ pub fn rustc_cargo(
1174
1174
// We want to link against registerEnzyme and in the future we want to use additional
1175
1175
// functionality from Enzyme core. For that we need to link against Enzyme.
1176
1176
if builder. config . llvm_enzyme {
1177
+ let arch = builder. build . build ;
1178
+ let enzyme_dir = builder. build . out . join ( arch) . join ( "enzyme" ) . join ( "lib" ) ;
1179
+ cargo. rustflag ( "-L" ) . rustflag ( enzyme_dir. to_str ( ) . expect ( "Invalid path" ) ) ;
1180
+
1177
1181
let llvm_config = builder. llvm_config ( builder. config . build ) . unwrap ( ) ;
1178
1182
let llvm_version_major = llvm:: get_llvm_version_major ( builder, & llvm_config) ;
1179
1183
cargo. rustflag ( "-l" ) . rustflag ( & format ! ( "Enzyme-{llvm_version_major}" ) ) ;
Original file line number Diff line number Diff line change 1
- //@ compile-flags: -C opt-level=3 -Clto=fat
1
+ //@ compile-flags: -Zautodiff=Enable - C opt-level=3 -Clto=fat
2
2
//@ no-prefer-dynamic
3
3
//@ needs-enzyme
4
4
#![ feature( autodiff) ]
You can’t perform that action at this time.
0 commit comments