rust: Use v0 mangling format globally

By default, rust uses the `legacy` mangling format. Using llvm coverage
switches it to using the new `v0` format. Rather than pushing the llvm
coverage back to `legacy` format, move Android forwards to `v0`. This
also has the added benefit that Rust symbols can be detected in the
codebase by looking for a leading "_R", aiding in demangler selection.

Test: builds, resulting object files have leading _R rather than _Z
Test: atest keystore2_test
Bug: 178565008
Change-Id: I7fcd591535d08260686c62fbfa6f7b61b31ed989
This commit is contained in:
Matthew Maurer 2021-02-01 14:56:21 -08:00
parent 8705ba06bf
commit 20768b8840
1 changed files with 2 additions and 0 deletions

View File

@ -47,6 +47,8 @@ var (
"-C debuginfo=2",
"-C opt-level=3",
"-C relocation-model=pic",
// Use v0 mangling to distinguish from C++ symbols
"-Z symbol-mangling-version=v0",
}
deviceGlobalRustFlags = []string{