Skip to content

Commit ab54768

Browse files
authored
Merge pull request #7 from postgresml/montana/static
static link cuda
2 parents ece10fc + b867ac8 commit ab54768

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lightgbm-sys/build.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ fn main() {
4141
.profile("Release")
4242
.uses_cxx11()
4343
.define("BUILD_STATIC_LIB", "ON")
44+
.define("USE_CUDA", "1")
4445
.define("USE_CUDA_EXP", "1")
4546
.build();
4647

@@ -89,8 +90,6 @@ fn main() {
8990
#[cfg(feature = "cuda")]
9091
{
9192
println!("cargo:rustc-link-search={}", "/usr/local/cuda/lib64");
92-
println!("cargo:rustc-link-search={}", "/usr/local/cuda/lib64/stubs");
93-
println!("cargo:rustc-link-lib=dylib=cuda");
94-
println!("cargo:rustc-link-lib=dylib=cudart");
93+
println!("cargo:rustc-link-lib=static=cudart_static");
9594
}
9695
}

0 commit comments

Comments
 (0)