Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Interpolate in key_value_arg, such as --crate-map
Summary: `rustc_action.py` receives arguments like: ``` ... --crate-map=$(cat buck-out/v2/gen/fbcode/767cf7b4a84025eb/aiplatform/hpc_scheduler/if/__hpcscheduler-rust-crate__/out/types)=fbcode//aiplatform/hpc_scheduler/if:hpcscheduler-rust ... buck-out/v2/gen/fbcode/99cab575c71b0a4b/tools/build/buck/wrappers/__rust-platform010-clang-15-compiler__/__command_alias_trampoline.sh ... --extern=$(cat buck-out/v2/gen/fbcode/767cf7b4a84025eb/aiplatform/hpc_scheduler/if/__hpcscheduler-rust-crate__/out/types)=buck-out/v2/gen/fbcode/767cf7b4a84025eb/aiplatform/hpc_scheduler/if/__hpcscheduler-rust__/rlib-pic-static_pic-link/libhpcscheduler-02ee50c9.rlib ``` where the `--crate-map` flag (which comes before path/to/bin/rustc) is for our rustc_action.py, while `--extern` (which comes after) is a flag for rustc. The `--crate-map` flags are used by rustc_action.py to remap crate **names** reported as unused by rustc into Buck **labels** to be removed from a target's `deps`. Reviewed By: zertosh Differential Revision: D58790339 fbshipit-source-id: 3b180529b388d893abbbf2bbcd192acbb23d44d1
- Loading branch information