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

    <tr>
        <th>Summary</th>
        <td>
            [libc] investigate the usage of `-fno-builtin-foo` for foo.c rather than -ffreestanding
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            libc
      </td>
    </tr>

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

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

<pre>
    cmake/modules/LLVMLibCCompileOptionRules.cmake currently blankets `-ffreestanding` (for CPU targets) for TUs to avoid creating infinite recursion via things like loop idiom recognition turning the implementation of memcpy into memcpy.  I think I'd like to remove `-ffreestanding` and instead move to building strlen with `-fno-builtin-strlen`, etc, for all symbols, and remove `-ffreestanding`. Clang supports a function attribute for this, but gcc does not, so command line flags it is.

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96628
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8U9GK7DYM_RrPi5iQcSaZ5CEP21kCF7a0lN6-FttRHHUcO9jyXLZfX5xdKL2U-2SjIx9Jx0cqJbIecRTtT6J9PanMa4ijJ_OYMansPGFMJx3m99Fs6oFCTluYs8Mk5PT29sfPb6Tv97Dt5PCXnSn43wpYHclgcozo2b2Ddso_kBOIrj4vS0RMrPxM3oquBiH7JUS4__oVWEWLnIQcoIR-_5qAA6hnoBlMRMXkLZBfyBMjRDQ5JgoenqSAV_I2gaMHggthB5opbCUpWE-lOeAcfWHgFYG23eGGntUBhQU23Mz-DuQ5fN4rgC8H7wO-CHmbP8g5QMQtPPH_x1F-BvKJUc1wZHEAnckVHBJHhx6-Ea8fr304F5DJnz8w0dVC3gHZlKOooJyD9L7p4FIJFf4f1K_g7lSplPc9RE6gYMneHEMq5kg6Mx68vNJBqDODNQbmgAl84BJLAUzYtlLLkUdYnLIJiIFSJeoXUb-szHsSzYuQk5CTNaayPlchWiEnne3f5JwSckpr-PanzrYylkQz0Sya16HrZH-ax2YemkGdcLzcmubSDU17O61jO7R9vzTd7Xa91I2a1bx0ajFa6qXrtbmeaJS1vF5kLS9D27ZtpWbd980y9J02vRmMuNa4KXKVc8-ttHSilDKOl0vfDPLklEaXDtNL6UgbIWWxfxxL_llnm8S1dpQ4_cvAxO5YlONB-wrkn5iYrGI8_JSTslhs9P23LiEUWxTFlxAqA1HxikV-5eG_33fK0Y3fCUu8Zl2ZsAk5lW4-j_Mew19oWMjpGK5s5Od8z1H-EwAA__-ceE6I">