File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
src/bootstrap/src/core/build_steps Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -1092,8 +1092,11 @@ pub fn rustc_cargo(
10921092
10931093 // We want to link against registerEnzyme and in the future we want to use additional
10941094 // functionality from Enzyme core. For that we need to link against Enzyme.
1095- // FIXME(ZuseZ4): Get the LLVM version number automatically instead of hardcoding it.
10961095 if builder. config . llvm_enzyme {
1096+ let arch = builder. build . build ;
1097+ let enzyme_dir = builder. build . out . join ( arch) . join ( "enzyme" ) . join ( "lib" ) ;
1098+ cargo. rustflag ( "-L" ) . rustflag ( enzyme_dir. to_str ( ) . expect ( "Invalid path" ) ) ;
1099+ // FIXME(ZuseZ4): Get the LLVM version number automatically instead of hardcoding it.
10971100 cargo. rustflag ( "-l" ) . rustflag ( "Enzyme-19" ) ;
10981101 }
10991102
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
22//@ no-prefer-dynamic
33//@ needs-enzyme
44#![ feature( autodiff) ]
You can’t perform that action at this time.
0 commit comments