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 @@ -1093,6 +1093,10 @@ pub fn rustc_cargo(
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.
10951095 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+
10961100 let llvm_config = builder. llvm_config ( builder. config . build ) . unwrap ( ) ;
10971101 let llvm_version_major = llvm:: get_llvm_version_major ( builder, & llvm_config) ;
10981102 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
22//@ no-prefer-dynamic
33//@ needs-enzyme
44#![ feature( autodiff) ]
You can’t perform that action at this time.
0 commit comments