Skip to content

Commit 45d83aa

Browse files
committed
Library::iomp5_dir becomes None only for mkl-*-*-seq cases
1 parent 89cc629 commit 45d83aa

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

intel-mkl-tool/src/entry.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ pub struct Library {
1616
library_dir: PathBuf,
1717
/// Directory where `libiomp5.a` or `libiomp5.so` exists
1818
///
19-
/// They are sometimes placed in different position.
20-
/// Returns `None` if they exist on `library_dir`.
19+
/// They are not required for `mkl-*-*-seq` cases,
20+
/// and then this is `None`.
2121
iomp5_dir: Option<PathBuf>,
2222
}
2323

@@ -156,9 +156,6 @@ impl Library {
156156
if config.parallel == Threading::OpenMP && iomp5_dir.is_none() {
157157
return Ok(None);
158158
}
159-
if library_dir == iomp5_dir {
160-
iomp5_dir = None;
161-
}
162159
Ok(match (library_dir, include_dir) {
163160
(Some(library_dir), Some(include_dir)) => Some(Library {
164161
config,
@@ -253,7 +250,9 @@ impl Library {
253250
pub fn print_cargo_metadata(&self) -> Result<()> {
254251
println!("cargo:rustc-link-search={}", self.library_dir.display());
255252
if let Some(iomp5_dir) = &self.iomp5_dir {
256-
println!("cargo:rustc-link-search={}", iomp5_dir.display());
253+
if iomp5_dir != &self.library_dir {
254+
println!("cargo:rustc-link-search={}", iomp5_dir.display());
255+
}
257256
}
258257
for lib in self.config.libs() {
259258
match self.config.link {

0 commit comments

Comments
 (0)