Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 6c7646f

Browse files
committedAug 20, 2022
Explicitly specify link type of iomp5md
1 parent 292ad1f commit 6c7646f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed
 

‎intel-mkl-tool/src/entry.rs‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,22 +419,25 @@ impl Library {
419419
(Some(static_dir), Some(dynamic_dir)) => match self.config.link {
420420
LinkType::Static => {
421421
println!("cargo:rustc-link-search={}", static_dir.display());
422+
println!("cargo:rustc-link-lib=static={}", OPENMP_RUNTIME_LIB);
422423
}
423424
LinkType::Dynamic => {
424425
println!("cargo:rustc-link-search={}", dynamic_dir.display());
426+
println!("cargo:rustc-link-lib=dylib={}", OPENMP_RUNTIME_LIB);
425427
}
426428
},
427429
(Some(static_dir), None) => {
428430
println!("cargo:rustc-link-search={}", static_dir.display());
431+
println!("cargo:rustc-link-lib=static={}", OPENMP_RUNTIME_LIB);
429432
}
430433
(None, Some(dynamic_dir)) => {
431434
println!("cargo:rustc-link-search={}", dynamic_dir.display());
435+
println!("cargo:rustc-link-lib=dylib={}", OPENMP_RUNTIME_LIB);
432436
}
433437
_ => {
434438
bail!("OpenMP runtime not found");
435439
}
436440
}
437-
println!("cargo:rustc-link-lib={}", OPENMP_RUNTIME_LIB);
438441
}
439442
Ok(())
440443
}

0 commit comments

Comments
 (0)
Please sign in to comment.