Skip to content

Commit d701ec3

Browse files
committed
Add rustc-link-search for both static and dynamic if found
1 parent 292ad1f commit d701ec3

File tree

1 file changed

+5
-21
lines changed

1 file changed

+5
-21
lines changed

intel-mkl-tool/src/entry.rs

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -412,27 +412,11 @@ impl Library {
412412
}
413413

414414
if self.config.parallel == Threading::OpenMP {
415-
match (
416-
self.iomp5_static_dir.as_ref(),
417-
self.iomp5_dynamic_dir.as_ref(),
418-
) {
419-
(Some(static_dir), Some(dynamic_dir)) => match self.config.link {
420-
LinkType::Static => {
421-
println!("cargo:rustc-link-search={}", static_dir.display());
422-
}
423-
LinkType::Dynamic => {
424-
println!("cargo:rustc-link-search={}", dynamic_dir.display());
425-
}
426-
},
427-
(Some(static_dir), None) => {
428-
println!("cargo:rustc-link-search={}", static_dir.display());
429-
}
430-
(None, Some(dynamic_dir)) => {
431-
println!("cargo:rustc-link-search={}", dynamic_dir.display());
432-
}
433-
_ => {
434-
bail!("OpenMP runtime not found");
435-
}
415+
if let Some(ref dir) = self.iomp5_static_dir {
416+
println!("cargo:rustc-link-search={}", dir.display());
417+
}
418+
if let Some(ref dir) = self.iomp5_dynamic_dir {
419+
println!("cargo:rustc-link-search={}", dir.display());
436420
}
437421
println!("cargo:rustc-link-lib={}", OPENMP_RUNTIME_LIB);
438422
}

0 commit comments

Comments
 (0)