summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Matthew Maurer <mmaurer@google.com> 2021-02-01 14:56:21 -0800
committer Matthew Maurer <mmaurer@google.com> 2021-02-02 00:23:26 +0000
commit20768b88404325d62ba84a7dc917c377defcbdbc (patch)
treeec40f6d7ff4002d4de321c4de8252c11f5b93f62
parent8705ba06bfa7844a7db55065154cb8d57ab07dca (diff)
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
-rw-r--r--rust/config/global.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/rust/config/global.go b/rust/config/global.go
index fb6227804..182dc6ac2 100644
--- a/rust/config/global.go
+++ b/rust/config/global.go
@@ -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{