diff options
author | 2022-01-25 22:32:39 -0800 | |
---|---|---|
committer | 2022-01-26 21:39:49 +0000 | |
commit | 668da2309632047e2215926e92bb26a3b7d71b26 (patch) | |
tree | 3864810eec0f833d85bbd465277fe8ded2e4be9a /rust/coverage.go | |
parent | 3239bcb16d5e93565ccdf1c6aae46e1d845129ba (diff) |
[rust/coverage] Remove obsolete WAR to pass -z,start-stop-gc
Bug: http://b/199203503
Rust's llvm-project source now includes https://reviews.llvm.org/D97448
and we no longer need this workaround.
Test: m unicode-xid_test_src_lib and verify __llvm_prf_data section is
present.
Change-Id: I0387bd3af8bfc765f3aba3b309bfbc7ef49d565d
Diffstat (limited to 'rust/coverage.go')
-rw-r--r-- | rust/coverage.go | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/rust/coverage.go b/rust/coverage.go index 8fdfa2342..050b811c7 100644 --- a/rust/coverage.go +++ b/rust/coverage.go @@ -57,18 +57,7 @@ func (cov *coverage) flags(ctx ModuleContext, flags Flags, deps PathDeps) (Flags flags.RustFlags = append(flags.RustFlags, "-Z instrument-coverage", "-g") flags.LinkFlags = append(flags.LinkFlags, - profileInstrFlag, "-g", coverage.OutputFile().Path().String(), "-Wl,--wrap,open", - // Upstream LLVM change 6d2d3bd0a6 made - // -z,start-stop-gc the default. It drops metadata - // sections like __llvm_prf_data unless they are marked - // SHF_GNU_RETAIN. https://reviews.llvm.org/D97448 - // marks generated sections, including __llvm_prf_data - // as SHF_GNU_RETAIN. However this change is not in - // the Rust toolchain. Since we link Rust libs with - // new lld, we should use nostart-stop-gc until the - // Rust toolchain updates past D97448. - "-Wl,-z,nostart-stop-gc", - ) + profileInstrFlag, "-g", coverage.OutputFile().Path().String(), "-Wl,--wrap,open") deps.StaticLibs = append(deps.StaticLibs, coverage.OutputFile().Path()) } |