Skip to content

Consider emitting cargo:rerun-if-changed line for argument of cxx::Build::bridge #26

@dtolnay

Description

@dtolnay

https://docs.rs/cxx/0.1.2/cxx/struct.Build.html#method.bridge could automatically do:

println!("cargo:rerun-if-changed={}", rust_source_file);

According to https://doc.rust-lang.org/cargo/reference/build-scripts.html#outputs-of-the-build-script:

rerun-if-changed=PATH is a path to a file or directory which indicates that the build script should be re-run if it changes (detected by a more-recent last-modified timestamp on the file). Normally build scripts are re-run if any file inside the crate root changes, but this can be used to scope changes to just a small set of files.

Metadata

Metadata

Assignees

No one assigned

    Labels

    cargoIssues affecting Cargo-based use of cxx

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions