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

    <tr>
        <th>Summary</th>
        <td>
            undefined reference to `memcpy.inline'
        </td>
    </tr>

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

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

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

<pre>
    I'm using clang 19.1.5 on NixOS and getting undefined references to `memcpy.inline` and `memset.inline`.

More details here: https://github.com/NixOS/nixpkgs/issues/371540

I'm pretty sure this is a NixOS issue, but I would like to open this issue as I believe it may be a Clang issue.

I've tried to read the documents for LLVM but I still don't fully understand how clang links `mem*.inline` functions.

I've checked the nix paths and they do seems to include the paths to the underlying libs. Are `mem*.inline` functions linked via `*.so` files? If so, which ones?

The trace I've done on Nix leads to `memcpy@GLIBC2.2.5`. Am I on the right path? and is there documentation for how this linking process is done?

Thanks.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJx8U8GOozgQ_RpzKQ0yBkJy4JDpVVaRenYPu9q7wQV4Y-zIZaebvx_ZYdQ90mhOQPGq6r1XVZJIzxaxZ-1X1v5RyBgW5_stSmulLQantv7KRLdCJG1nGI20M1SnsipbcBb-0u9__wPSKpgxhISIVuGkLSrwOKFHOyJBcMAOfMV1vG-ltkZbZAee855xwvARLxk_M37-5jyCwiC1IVjQI6vPsIRwJ1afmbgwcZl1WOJQjm5l4pK5MHGx-v1-m4mJiyaKmF7qrmob_iz7lHP3GMIGFD1CWDSBJpC7nJzGxAsMMcAV3lw0Coy-YdLh7mh_ZFBEkARXGNBofCDoAKvcYECQ8JKtyqDyo_MDIXiNKpXyKBWEBUG5Ma5oA8HkPLy-_vdtb01BGwPKWSa6AFM0ZssGewrJu8W97RMx2t5o95KJ8yePp2jHoJ2ln0mMC443fLa3-h3uMiyUBxIW3EA5IMQ1T07b0USFGfqEBZc_MhOz6dx_oBLOHn_PIfNEBQ8tEzChyGWENkisvsB1AnLJ-7dFjws4m8NP6v8uyTw5IuwilLO4byEYlOrnRWMN__P1-vVFlKJs01rBeYVrwifyXs9LyHpS2yRcU_rhP8YhE-c8kmR0nnnin_TevRuR8tYkEp8oSnujslB9rU71SRbYV119qA8tPzbF0ldTI2peHXCQJ96I5qCmoxpFPVZdpY6iKnQvuGh5xY_VqT7yphSia7q266q6nQY-SNZwXKU2pTGPtXR-LvKK9ZUQ1aEqjBzQUD5nISy-_Vhmka7b9ynpyxBnYg03mgJ9lAk6GOx_cb6_vF7RFdGb_jfnmArvjy937_7HMXw-yZ3voxffAwAA___cTXo6">