From 6945e9b65042a722a6db399481799f11628cee47 Mon Sep 17 00:00:00 2001 From: Joel Galenson Date: Tue, 25 Aug 2020 15:12:59 -0700 Subject: [PATCH] Migrate away from removed option Upstream removed the -Z no-landing-pads option in https://github.com/rust-lang/rust/pull/70175, which we picked up in our latest toolchain update. Fixes: 166317885 Test: Build and TreeHugger Change-Id: I51c0ef671bf6a334b2b7223da42cab547e4407d3 --- rust/coverage.go | 2 +- rust/coverage_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rust/coverage.go b/rust/coverage.go index 223ba4f19..26375f507 100644 --- a/rust/coverage.go +++ b/rust/coverage.go @@ -53,7 +53,7 @@ func (cov *coverage) flags(ctx ModuleContext, flags Flags, deps PathDeps) (Flags flags.Coverage = true coverage := ctx.GetDirectDepWithTag(CovLibraryName, cc.CoverageDepTag).(cc.LinkableInterface) flags.RustFlags = append(flags.RustFlags, - "-Z profile", "-g", "-C opt-level=0", "-C link-dead-code", "-Z no-landing-pads") + "-Z profile", "-g", "-C opt-level=0", "-C link-dead-code") flags.LinkFlags = append(flags.LinkFlags, "--coverage", "-g", coverage.OutputFile().Path().String(), "-Wl,--wrap,getenv") deps.StaticLibs = append(deps.StaticLibs, coverage.OutputFile().Path()) diff --git a/rust/coverage_test.go b/rust/coverage_test.go index 357c2e8b1..73673d035 100644 --- a/rust/coverage_test.go +++ b/rust/coverage_test.go @@ -56,7 +56,7 @@ func TestCoverageFlags(t *testing.T) { fizzCov := ctx.ModuleForTests("fizz_cov", "android_arm64_armv8-a_cov").Rule("rustc") buzzNoCov := ctx.ModuleForTests("buzzNoCov", "android_arm64_armv8-a").Rule("rustc") - rustcCoverageFlags := []string{"-Z profile", " -g ", "-C opt-level=0", "-C link-dead-code", "-Z no-landing-pads"} + rustcCoverageFlags := []string{"-Z profile", " -g ", "-C opt-level=0", "-C link-dead-code"} for _, flag := range rustcCoverageFlags { missingErrorStr := "missing rustc flag '%s' for '%s' module with coverage enabled; rustcFlags: %#v" containsErrorStr := "contains rustc flag '%s' for '%s' module with coverage disabled; rustcFlags: %#v"