The code [here](https://github.com/rust-lang/cargo/blame/de31a3498dcf1641eaa619988df96321c66d2f8b/src/cargo/core/compiler/context/compilation_files.rs#L630-L632) should not be testing on the target name, but instead should be using the `cfg` data to test the vendor/os/env fields. There may be other places in the Cargo codebase that example the target triple that should probably also use `cfg` testing.