From 885f1c697d61a08e33c3199113fe8b86562b065b Mon Sep 17 00:00:00 2001 From: Chih-Hung Hsieh Date: Sun, 29 Sep 2019 22:38:31 -0700 Subject: [PATCH] Emit linked file and dep-info in one call to rustc Bug: 141858619 Test: mm in projects with Rust modules Change-Id: I05a2e06caa177f95bc2ad3691a5f48294051a212 --- rust/builder.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rust/builder.go b/rust/builder.go index 66114928b..104313f8a 100644 --- a/rust/builder.go +++ b/rust/builder.go @@ -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