diff options
| author | 2023-10-20 15:48:28 +0000 | |
|---|---|---|
| committer | 2023-10-20 15:48:28 +0000 | |
| commit | a76ea9ac49a3d22ea7f79e99c75f58d424604307 (patch) | |
| tree | dfbd92e88195912ac9fd11c39e938c74a8cc6996 | |
| parent | f76b3267d52aa90f99ba6b75d33a8231a1db9e58 (diff) | |
| parent | 77833b7502f3976ac8b47faf5bdbe9a9021f24c2 (diff) | |
Merge changes from topic "revert-2788316-JFVDBRFDKA" into main
* changes:
Revert "Decompress debug sections when creating debug info"
Revert "Compress debug info in clang builds with zstd"
Revert "Use zstd to compress debug info in cc libraries"
Revert "Use zstd to compress debug info in rust libraries"
| -rw-r--r-- | cc/config/arm64_linux_host.go | 5 | ||||
| -rw-r--r-- | cc/config/arm_linux_host.go | 12 | ||||
| -rw-r--r-- | cc/config/global.go | 7 | ||||
| -rw-r--r-- | cc/config/x86_linux_bionic_host.go | 6 | ||||
| -rw-r--r-- | cc/config/x86_linux_host.go | 6 | ||||
| -rw-r--r-- | rust/config/global.go | 2 | ||||
| -rwxr-xr-x | scripts/strip.sh | 12 |
7 files changed, 7 insertions, 43 deletions
diff --git a/cc/config/arm64_linux_host.go b/cc/config/arm64_linux_host.go index 335ad5672..9f5124bb4 100644 --- a/cc/config/arm64_linux_host.go +++ b/cc/config/arm64_linux_host.go @@ -46,10 +46,6 @@ var ( "-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 @@ -64,7 +60,6 @@ var ( 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 diff --git a/cc/config/arm_linux_host.go b/cc/config/arm_linux_host.go index e21c60d63..525fb5d5d 100644 --- a/cc/config/arm_linux_host.go +++ b/cc/config/arm_linux_host.go @@ -27,24 +27,16 @@ var ( "-march=armv7a", } - linuxArmLldflags = append(linuxArmLdflags, - "-Wl,--compress-debug-sections=zstd", - ) - linuxArm64Ldflags = []string{} - - linuxArm64Lldflags = append(linuxArm64Ldflags, - "-Wl,--compress-debug-sections=zstd", - ) ) func init() { exportedVars.ExportStringListStaticVariable("LinuxArmCflags", linuxArmCflags) exportedVars.ExportStringListStaticVariable("LinuxArm64Cflags", linuxArm64Cflags) exportedVars.ExportStringListStaticVariable("LinuxArmLdflags", linuxArmLdflags) - exportedVars.ExportStringListStaticVariable("LinuxArmLldflags", linuxArmLldflags) + exportedVars.ExportStringListStaticVariable("LinuxArmLldflags", linuxArmLdflags) exportedVars.ExportStringListStaticVariable("LinuxArm64Ldflags", linuxArm64Ldflags) - exportedVars.ExportStringListStaticVariable("LinuxArm64Lldflags", linuxArm64Lldflags) + exportedVars.ExportStringListStaticVariable("LinuxArm64Lldflags", linuxArm64Ldflags) exportedVars.ExportStringListStaticVariable("LinuxArmYasmFlags", []string{"-f elf32 -m arm"}) exportedVars.ExportStringListStaticVariable("LinuxArm64YasmFlags", []string{"-f elf64 -m aarch64"}) diff --git a/cc/config/global.go b/cc/config/global.go index 666893778..62b008b06 100644 --- a/cc/config/global.go +++ b/cc/config/global.go @@ -133,9 +133,6 @@ var ( // Using simple template names reduces the size of debug builds. "-gsimple-template-names", - // Use zstd to compress debug data. - "-gz=zstd", - // Make paths in deps files relative. "-no-canonical-prefixes", } @@ -203,9 +200,7 @@ var ( "-Wl,-mllvm,-regalloc-enable-advisor=release", } - deviceGlobalLldflags = append(append(deviceGlobalLdflags, commonGlobalLldflags...), - "-Wl,--compress-debug-sections=zstd", - ) + deviceGlobalLldflags = append(deviceGlobalLdflags, commonGlobalLldflags...) hostGlobalCflags = []string{} diff --git a/cc/config/x86_linux_bionic_host.go b/cc/config/x86_linux_bionic_host.go index f80be9915..e0064717d 100644 --- a/cc/config/x86_linux_bionic_host.go +++ b/cc/config/x86_linux_bionic_host.go @@ -53,10 +53,6 @@ var ( "--gcc-toolchain=${LinuxBionicGccRoot}", } - linuxBionicLldflags = append(linuxBionicLdflags, - "-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 @@ -75,7 +71,7 @@ const ( func init() { exportedVars.ExportStringListStaticVariable("LinuxBionicCflags", linuxBionicCflags) exportedVars.ExportStringListStaticVariable("LinuxBionicLdflags", linuxBionicLdflags) - exportedVars.ExportStringListStaticVariable("LinuxBionicLldflags", linuxBionicLldflags) + exportedVars.ExportStringListStaticVariable("LinuxBionicLldflags", linuxBionicLdflags) // Use the device gcc toolchain for now exportedVars.ExportStringStaticVariable("LinuxBionicGccVersion", x86_64GccVersion) diff --git a/cc/config/x86_linux_host.go b/cc/config/x86_linux_host.go index f95da0b3b..93aa82ec5 100644 --- a/cc/config/x86_linux_host.go +++ b/cc/config/x86_linux_host.go @@ -59,10 +59,6 @@ var ( "--gcc-toolchain=${LinuxGccRoot}", } - linuxLldflags = append(linuxLdflags, - "-Wl,--compress-debug-sections=zstd", - ) - linuxGlibcLdflags = []string{ "--sysroot ${LinuxGccRoot}/sysroot", } @@ -142,7 +138,7 @@ func init() { exportedVars.ExportStringListStaticVariable("LinuxCflags", linuxCflags) exportedVars.ExportStringListStaticVariable("LinuxLdflags", linuxLdflags) - exportedVars.ExportStringListStaticVariable("LinuxLldflags", linuxLldflags) + exportedVars.ExportStringListStaticVariable("LinuxLldflags", linuxLdflags) exportedVars.ExportStringListStaticVariable("LinuxGlibcCflags", linuxGlibcCflags) exportedVars.ExportStringListStaticVariable("LinuxGlibcLdflags", linuxGlibcLdflags) exportedVars.ExportStringListStaticVariable("LinuxGlibcLldflags", linuxGlibcLdflags) diff --git a/rust/config/global.go b/rust/config/global.go index 4d31121e5..b94d92fd9 100644 --- a/rust/config/global.go +++ b/rust/config/global.go @@ -65,7 +65,6 @@ var ( "-lpthread", "-lm", "-lgcc_s", - "-Wl,--compress-debug-sections=zstd", } deviceGlobalRustFlags = []string{ @@ -87,7 +86,6 @@ var ( "-Wl,--use-android-relr-tags", "-Wl,--no-undefined", "-B${cc_config.ClangBin}", - "-Wl,--compress-debug-sections=zstd", } ) diff --git a/scripts/strip.sh b/scripts/strip.sh index 7b360bf5f..d09c187b1 100755 --- a/scripts/strip.sh +++ b/scripts/strip.sh @@ -98,17 +98,9 @@ do_strip_keep_mini_debug_info_linux() { "${CLANG_BIN}/llvm-strip" --strip-all --keep-section=.ARM.attributes --remove-section=.comment "${infile}" -o "${outfile}.tmp" || fail=true if [ -z $fail ]; then - # create_minidebuginfo has issues with compressed debug sections. Just - # decompress them for now using objcopy which understands compressed - # debug sections. - # b/306150780 tracks supporting this directly in create_minidebuginfo - decompressed="${infile}.decompressed" - "${CLANG_BIN}/llvm-objcopy" --decompress-debug-sections \ - "${infile}" "${decompressed}" - - "${CREATE_MINIDEBUGINFO}" "${decompressed}" "${outfile}.mini_debuginfo.xz" + "${CREATE_MINIDEBUGINFO}" "${infile}" "${outfile}.mini_debuginfo.xz" "${CLANG_BIN}/llvm-objcopy" --add-section .gnu_debugdata="${outfile}.mini_debuginfo.xz" "${outfile}.tmp" - rm -f "${outfile}.mini_debuginfo.xz" "${decompressed}" + rm -f "${outfile}.mini_debuginfo.xz" else cp -f "${infile}" "${outfile}.tmp" fi |