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

    <tr>
        <th>Summary</th>
        <td>
            How to build LLVMgold.so
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

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

<pre>
    I am trying to build the cuzebox Uzebox emulator under Debian rv64, on a VisionFive 2 SBC. It built fine with gcc but was horribly slow so I want to see if it performs any better with clang but when it comes to linking clang complains it can't find LLVMgold.so.

Under Debian amd64, you can easily install LLVMgold.so by installing the llvm-dev package. This package does exist and I have it installed under Debian rv64 but it does not contain a LLVMgold.so so it seems I must build it myself.

I found these instructions for building The LLVM gold plugin:

https://llvm.org/docs/GoldPlugin.html

I have successfully followed the steps outlined in "How to build it" but when it gets to building the actual plugin library I don't understand what it means, it says:

"Build the LLVMgold plugin. Run CMake with -DLLVM_BINUTILS_INCDIR=/path/to/binutils/include. The correct include path will contain the file plugin-api.h."

Run cmake where? The previous instructions had the user download and build binutils which doesn't use cmake so it looks like these instructions are incomplete.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxsVM2O2zgTfBr50hhBpsdyfNAhM4a_T0ASLJJMrgFFtqTeoUiDTVrxPv2ClGdi7-7Fglv9U1VdLclMg0Vsiu1TsT2sZAyj842WtnOkV53Tl6YFOUHwF7IDBAddJKMhjAgq_oWd-wUvywOnaGRwHqLV6OGAHUkL_lw_FuIZnAUJP4jJ2SOdEQR8e3ouoQ25YYCeLMJMYYRBKehigFkyjM576swF2LgZ2EELs7Qh4WBEoB4owAl97_zEIO0FOgwB_dJJGWmHpdeINqUqNyGnakP2NRFaUpSbTkaS5ZwjbSF2GZGGT59-fB6c0SW7sqgORfVx-X255SgnvZC8uJjKASWTuQBZDtKY2ybQvYezniOCMefp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