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(
11971197 if let Some ( llvm_config) = builder. llvm_config ( builder. config . build ) {
11981198 //let llvm_version_major = llvm::get_llvm_version_major(builder, &llvm_config);
11991199 //cargo.rustflag("-l").rustflag(&format!("EnzymeStatic-{llvm_version_major}"));
1200- cargo. rustflag ( abs_path) ;
1200+ cargo. rustflag ( abs_path. to_str ( ) . unwrap ( ) ) ;
12011201 }
12021202 }
12031203
Original file line number Diff line number Diff line change @@ -988,9 +988,15 @@ impl Builder<'_> {
988988 let llvm_libdir =
989989 command ( llvm_config) . arg ( "--libdir" ) . run_capture_stdout ( self ) . stdout ( ) ;
990990 if target. is_msvc ( ) {
991+ // FIXME(autodiff): Enzyme does currently not support MSVC.
991992 rustflags. arg ( & format ! ( "-Clink-arg=-LIBPATH:{llvm_libdir}" ) ) ;
992993 } else {
993994 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+ }
9941000 }
9951001 }
9961002 }
You can’t perform that action at this time.
0 commit comments