bors[bot] 6c0cdc5f55
Merge #8774
8774: feat: Honor `.cargo/config.toml` r=matklad a=Veykril

![f1Gup1aiAn](https://user-images.githubusercontent.com/3757771/117545448-1dcaae00-b026-11eb-977a-0f35a5e3f2e0.gif)

Implements `cargo/.config` build target and cfg access by using unstable cargo options:

- `cargo config get` to read the target triple out of the config to pass to `cargo metadata` --filter-platform
- `cargo rustc --print` to read out the `rustc_cfgs`, this causes us to honor `rustflags` and the like.

If those commands fail, due to not having a nightly toolchain present for example, they will fall back to invoking rustc directly as we currently do.

I personally think it should be fine to use these unstable options as they are unlikely to change(even if they did it shouldn't be a problem due to the fallback) and don't burden the user if they do not have a nightly toolchain at hand since we fall back to the previous behaviour.

cc #8741
Closes #6604, Closes #5904, Closes #8430, Closes #8480

Co-authored-by: Lukas Wirth <lukastw97@gmail.com>
2021-05-09 10:33:31 +00:00
..
2021-04-19 12:26:04 -07:00
2021-05-06 23:23:50 +02:00
2021-05-06 22:19:52 +00:00
2021-05-08 22:09:03 +00:00
2021-05-08 23:14:08 +02:00
2021-04-18 02:14:27 +00:00
2021-05-08 23:14:08 +02:00
2021-05-06 20:12:15 +03:00
2021-05-08 23:28:36 +03:00