cc-rs
cc-rs copied to clipboard
Add option to emit `rerun-if-env-changed` metadata
Partially fixes #230 by emitting directives for environment variables. Looking at #443, it seems uncontroversial to add an option to emit this metadata for environment variables.
This PR adds an option called emit_rerun_if_env_changed
to control this behavior, defaulted to false. I added a check in getenv
to print the metadata if this flag is true. Since I use the print
function, cargo_metadata
must also be true for this flag to have any effect.