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

Commit 77833b75 authored by Matías Hernández's avatar Matías Hernández
Browse files

Revert "Decompress debug sections when creating debug info"

Revert submission 2788316

Reason for revert: DroidMonitor-triggered revert due to breakage https://android-build.corp.google.com/builds/quarterdeck?branch=git_main&target=panther-next-userdebug&lkgb=10981485&lkbb=10981536&fkbb=10981536, bug b/306625613

Reverted changes: /q/submissionid:2788316

Change-Id: Idebeff995fa2cd6dd23cd4a2675c9f3c7f8307d9
BUG: 306625613
parent 6d089b7d
Loading
Loading
Loading
Loading
+2 −10
Original line number Original line Diff line number Diff line
@@ -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
    "${CLANG_BIN}/llvm-strip" --strip-all --keep-section=.ARM.attributes --remove-section=.comment "${infile}" -o "${outfile}.tmp" || fail=true


    if [ -z $fail ]; then
    if [ -z $fail ]; then
        # create_minidebuginfo has issues with compressed debug sections. Just
        "${CREATE_MINIDEBUGINFO}" "${infile}" "${outfile}.mini_debuginfo.xz"
        # 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"
        "${CLANG_BIN}/llvm-objcopy" --add-section .gnu_debugdata="${outfile}.mini_debuginfo.xz" "${outfile}.tmp"
        "${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
    else
        cp -f "${infile}" "${outfile}.tmp"
        cp -f "${infile}" "${outfile}.tmp"
    fi
    fi