cc-rs icon indicating copy to clipboard operation
cc-rs copied to clipboard

Add option to emit `rerun-if-env-changed` metadata

Open nathaniel-daniel opened this issue 2 years ago • 0 comments

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.

nathaniel-daniel avatar Jul 19 '22 04:07 nathaniel-daniel