Skip to content

build.rs picks CUDA paths from the host target, not the build target #29

Description

@CanReader

build.rs:25 and :33:

if cfg!(target_os = "windows") { "C:/Program Files/..." } else { "/usr/local/cuda" }

Inside a build script cfg!(target_os = ...) reflects the machine running the
build, not the target being built for. Cross compiling to Windows from Linux picks
the Linux paths. The supported way is CARGO_CFG_TARGET_OS.

Also missing println!("cargo:rerun-if-changed=build.rs");. Only cuda/ is
watched, so editing the build script itself doesn't trigger a rebuild.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Hygienearea:buildbugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions