Emit linked file and dep-info in one call to rustc

Bug: 141858619
Test: mm in projects with Rust modules
Change-Id: I05a2e06caa177f95bc2ad3691a5f48294051a212
This commit is contained in:
Chih-Hung Hsieh 2019-09-29 22:38:31 -07:00
parent 852116a061
commit 885f1c697d

View file

@ -29,8 +29,7 @@ var (
Command: "$rustcCmd " +
"-C linker=${config.RustLinker} " +
"-C link-args=\"${crtBegin} ${config.RustLinkerArgs} ${linkFlags} ${crtEnd}\" " +
"-o $out $in ${libFlags} $rustcFlags " +
"&& $rustcCmd --emit=dep-info -o $out.d $in ${libFlags} $rustcFlags",
"--emit link -o $out --emit dep-info=$out.d $in ${libFlags} $rustcFlags",
CommandDeps: []string{"$rustcCmd"},
Depfile: "$out.d",
Deps: blueprint.DepsGCC, // Rustc deps-info writes out make compatible dep files: https://github.com/rust-lang/rust/issues/7633