Skip to content

Commit 6d74226

Browse files
committed
fixup! Add 'cudart' method mimicking the '--cudart' nvcc command-line option.
1 parent d283e5e commit 6d74226

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,10 +1011,10 @@ impl Build {
10111011
}
10121012

10131013
let cudart = match &self.cudart {
1014-
Some(opt) => opt.as_str(),
1014+
Some(opt) => opt.as_str(), // {none|shared|static}
10151015
None => "none",
10161016
};
1017-
if self.cuda && cudart != "none" {
1017+
if cudart != "none" {
10181018
if let Some(nvcc) = which(&self.get_compiler().path) {
10191019
// Try to figure out the -L search path. If it fails,
10201020
// it's on user to specify one by passing it through
@@ -1052,7 +1052,7 @@ impl Build {
10521052

10531053
// And now the -l flag.
10541054
let lib = match cudart {
1055-
"dynamic" => "cudart",
1055+
"shared" => "cudart",
10561056
"static" => "cudart_static",
10571057
bad => panic!("unsupported cudart option: {}", bad),
10581058
};

0 commit comments

Comments
 (0)