Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 20768b88 authored by Matthew Maurer's avatar Matthew Maurer
Browse files

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
parent 8705ba06
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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{