cuviper / autocfg

Automatic cfg for Rust compiler features
Apache License 2.0
95 stars 24 forks source link

Check `CARGO_ENCODED_RUSTFLAGS` of cargo 1.55+, prefer over `RUSTFLAGS` #38

Closed ColinFinck closed 2 years ago

ColinFinck commented 2 years ago

To work around https://github.com/rust-lang/cargo/issues/10321 that occurs with cargo 1.55.0 and later.

cuviper commented 2 years ago

Thanks! However, I did also find my own WIP code I had mentioned, now posted as #39. Besides some refactoring, one difference is that I did not use the same split sequence for both environment variables, because Cargo itself treats them differently. In particular, it does not trim or skip empty args, only skipping if the whole variable is empty.

If you have a real workload that needs this, can you see if my change will work for you?

cuviper commented 2 years ago

39 is merged and published as 1.1.0, as well as a re-export as 0.1.8.