cc-rs
cc-rs copied to clipboard
Pass `--remap-path-prefix` to C compilers
It would be nice to be able to pass the path remapping stuff from rustc to dependent code to avoid non-determinism slipping in via C dependencies. Presumably this would need to check if the C compiler supports -ffile-prefix-map (at least locally, that's just clang, not GCC).
It seems to be possible to parse CARGO_ENCODED_RUSTFLAGS environment variable and simply pass on the reassignments.