File tree Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -1197,7 +1197,7 @@ pub fn rustc_cargo(
1197
1197
if let Some ( llvm_config) = builder. llvm_config ( builder. config . build ) {
1198
1198
//let llvm_version_major = llvm::get_llvm_version_major(builder, &llvm_config);
1199
1199
//cargo.rustflag("-l").rustflag(&format!("EnzymeStatic-{llvm_version_major}"));
1200
- cargo. rustflag ( abs_path) ;
1200
+ cargo. rustflag ( abs_path. to_str ( ) . unwrap ( ) ) ;
1201
1201
}
1202
1202
}
1203
1203
Original file line number Diff line number Diff line change @@ -988,9 +988,15 @@ impl Builder<'_> {
988
988
let llvm_libdir =
989
989
command ( llvm_config) . arg ( "--libdir" ) . run_capture_stdout ( self ) . stdout ( ) ;
990
990
if target. is_msvc ( ) {
991
+ // FIXME(autodiff): Enzyme does currently not support MSVC.
991
992
rustflags. arg ( & format ! ( "-Clink-arg=-LIBPATH:{llvm_libdir}" ) ) ;
992
993
} else {
993
994
rustflags. arg ( & format ! ( "-Clink-arg=-L{llvm_libdir}" ) ) ;
995
+ if self . config . llvm_enzyme {
996
+ let arch = self . build . build ;
997
+ let enzyme_dir = self . build . out . join ( arch) . join ( "enzyme" ) . join ( "lib" ) ;
998
+ rustflags. arg ( & format ! ( "-Clink-arg=-L{enzyme_dir}" ) ) ;
999
+ }
994
1000
}
995
1001
}
996
1002
}
You can’t perform that action at this time.
0 commit comments