Reapply "Use zstd to compress debug info in cc libraries"
This reverts commit d0500f10ef3593aca9b97138b0f5bc1986b631b7.
Test: m
Bug: 305277519
Change-Id: I126395d32cfc0048b6403c831613d9b4a178af4d
diff --git a/cc/config/arm64_linux_host.go b/cc/config/arm64_linux_host.go
index 9f5124b..335ad56 100644
--- a/cc/config/arm64_linux_host.go
+++ b/cc/config/arm64_linux_host.go
@@ -46,6 +46,10 @@
"-Wl,--no-undefined-version",
}
+ linuxCrossLldflags = append(linuxCrossLdflags,
+ "-Wl,--compress-debug-sections=zstd",
+ )
+
// Embed the linker into host bionic binaries. This is needed to support host bionic,
// as the linux kernel requires that the ELF interpreter referenced by PT_INTERP be
// either an absolute path, or relative from CWD. To work around this, we extract
@@ -60,6 +64,7 @@
func init() {
exportedVars.ExportStringListStaticVariable("LinuxBionicArm64Cflags", linuxCrossCflags)
exportedVars.ExportStringListStaticVariable("LinuxBionicArm64Ldflags", linuxCrossLdflags)
+ exportedVars.ExportStringListStaticVariable("LinuxBionicArm64Lldflags", linuxCrossLldflags)
}
// toolchain config for ARM64 Linux CrossHost. Almost everything is the same as the ARM64 Android