<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/89524>89524</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            llvm-strip --strip-debug on riscv64 produces unusually large binaries since llvm/clang 18
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          q66
      </td>
    </tr>
</table>

<pre>
    I started noticing that in my distribution binaries on riscv64 come out roughly 3.5 times larger than they should be. We compile with `-g2` by default and then process everything with `llvm-strip --strip-debug`. On all other architectures (x86_64, aarch64, ppc64le, ppc64) things come out more or less the same as before.

The set of flags used does not matter, other than the debug level. Dropping debug level to `-g0` produces small binaries. Using `strip` without arguments likewise produces small binaries; `--strip-debug` does not, however.

For instance, a build of Lua 5.4 package has an installed size of 3.5MB instead of 1MB on riscv64 now. It seems to apply to all packages in general.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx0k89u5DYMxp9GvhAxNPKfeA4-bBoMsEAXvbTosaAljq2uLLmilNR9-kKeTpIukIstSCT1fT-RyGxnTzSK7kl0zxXmtIQ4_tX31RTMPn4FThgTGfAhWW39DGnBBNbDuoOxnKKdcrLBw2Q9RksMwUO0rF_6FnRYCUJOEEOeF7dDU3eQ7EoMDuNMsVTzkBbagZeQnYGJavidSuZmHcGrTQuIXj7MSvQSph0MXTG7BOhNSfSwxaCJGeiF4p6WovGe5dzL-lA0bvBw-z8YmvIselnDLx7QOQhpoQgY9WIT6ZQjMQg1_D30f_StUD8BlrPbctt03zp6Wwp1huNGfre6hkgQIriiKS0EjCsBMkx0DZFqIZ-F_HL7_lqOKUG4wtXhzJCZDJhAXHjDiilRLLfdRN5hwWECHL2Qq-E5hm0rrj_sQgo3arJQ22IwWRMDr8Xx_aVq-I1LnujlwaaEFnLFBcY5r-QTg7Pf6dUyfVZFNE_HVT_wfXNR5C_htbzO_7xfQgTrOaHXB1CEKVtnCoufM0JXt7Ch_o4zwYIM6G_RzpEBtv9QCWzq7tvTsU94ZJ6-PX3sPx9ea_iagIlWLkxw29x-LJy7l-fSzTN5iujqyoyNOTdnrGg8PZ6avm_7QVbL2J_V6ZGUkdIMzWN3laq5Do3slG5QXjtd2VFJ1cpWneSpG6SsB5SKdDf1plFNLx9FK2lF6-rSlXWIc2WZM43DuVNt5XAix8ccKqUd-lkoVUYyjkcXT3lm0UpnOfF7hWSTo_GzNv-I4u31ss-c0bn9NoLvc8vWa4JSS6jLoQBOQ5WjG5eUNhbNF6EuQl1mm5Y81TqUuP_CDwVbDH-STkJdDmMs1OXw9m8AAAD__25VeZw">