Skip to content

Commit d2e7484

Browse files
committed
Remove redundant cargo instructions.
`cc` already sets rustc-link-search and rustc-link-lib after compiling.
1 parent a8cb7cf commit d2e7484

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

crates/optix/build.rs

-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
use find_cuda_helper::{find_cuda_root, find_optix_root};
2-
use std::env;
32
use std::path::{Path, PathBuf};
43

54
// OptiX is a bit exotic in how it provides its functions. It uses a function table
@@ -8,7 +7,6 @@ use std::path::{Path, PathBuf};
87
// OptiX provides this logic inside optix_stubs.h in the include dir, so we need to compile that
98
// to a lib and link it in so that we have the initialization and C function logic.
109
fn main() {
11-
let out_dir = env::var("OUT_DIR").unwrap();
1210
let mut optix_include = find_optix_root().expect(
1311
"Unable to find the OptiX SDK, make sure you installed it and
1412
that OPTIX_ROOT or OPTIX_ROOT_DIR are set",
@@ -30,9 +28,6 @@ fn main() {
3028
.include(cuda_include)
3129
.cpp(false)
3230
.compile("optix_stubs");
33-
34-
println!("cargo:rustc-link-search=native={}", out_dir);
35-
println!("cargo:rustc-link-lib=static=optix_stubs");
3631
}
3732

3833
fn bindgen_optix(optix_include: &Path, cuda_include: &Path) {

0 commit comments

Comments
 (0)