Use zstd to compress debug info in rust libraries

We can save a significant amount of disk space by compressing debug info
in rust builds. This adds a flag that configures compressing debug info
at the link stage for rust binaries.

Test: m
Bug: 305277519
Change-Id: Ia85d8dc0e7bea35d9f9abfeae27a4610b3113e78
This commit is contained in:
Eric Rahm 2023-10-13 20:01:15 +00:00
parent f52906f194
commit a806f9dc44

View file

@ -65,6 +65,7 @@ var (
"-lpthread",
"-lm",
"-lgcc_s",
"-Wl,--compress-debug-sections=zstd",
}
deviceGlobalRustFlags = []string{
@ -86,6 +87,7 @@ var (
"-Wl,--use-android-relr-tags",
"-Wl,--no-undefined",
"-B${cc_config.ClangBin}",
"-Wl,--compress-debug-sections=zstd",
}
)