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

    <tr>
        <th>Summary</th>
        <td>
            [libc][cmake] Deprecate LLVM_LIBC_* cmake flags and replacing them with LIBC_* flags.
        </td>
    </tr>

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

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

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

<pre>
    Currently, in LLVM libc's cmake build system, both styles of flags, `LLVM_LIBC_<flag>` and `LIBC_<flag>` are being used.

We would like to deprecate all `LLVM_LIBC_<flag>`-style in favor of `LIBC_<flag>`-style.  Our plan is as follow:

For LLVM 21:
- [ ] Create `LIBC_<flag>` variant of the current `LLVM_LIBC_<flag>`
- [ ] Error out if both `LLVM_LIBC_<flag>` and `LIBC_<flag>` are set
- [ ] If only `LLVM_LIBC_<flag>` is set, warn that `LLVM_LIBC_<flag>` will be deprecated in LLVM 22, use `LIBC_<flag>` instead; and set`LIBC_<flag>` to be the same as `LLVM_LIBC_<flag>`.
- [ ] Migrate all usages of `LLVM_LIBC_<flag>` in llvm-project repo to `LIBC_<flag>`.
- [ ] Migrate all usages of `LLVM_LIBC_<flag>` in llvm-zorg repo to `LIBC_<flag>`.
- [ ] Migrate all usages of `LLVM_LIBC_<flag>` in the remaining bots to `LIBC_<flag>`.
- [ ] (Optional) Create a tracking issue for LLVM 22 and close this issue, considering the work for this issue in LLVM 21 is completed.

For LLVM 22:
- [ ] Remove all the extra logic related to `LLVM_LIBC_<flag>` in the cmake build system.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJy0VEtv8zYQ_DXUZRGBoiw_Djr4EQMBEgTooT0GFLWSWFOkQFJ23V9fkHLspnWMovi-kwBxHzOzs8udk61GLEmxIcUu4aPvjC2V9iMmlanP5Xa0FrVXZ8K2IDW8vv76BkpWgrCFA9HzA0I1SlWDOzuPfQirjO_A-bNCB6aBRvHWhf9kTkP6x-vLZvtB8m14IPkzmVPguo7Pd14sQoVStzA6rFNC14Suf0M4mVHVoOQBwRuocbAouEfgSj1o9BRhBSINPxob4N1tO8WlAO-jhUFxDdIBd9AYpcyJ5OsJx97YSRGWTf-egBQbIMUOthYDnPukjtxKrn1o7zsEMYn8APeX0s_WBuijB9lMYv9vZR36L6VfGjBanR8VlC5msS2cuNXgO_4IOJykUlDhbUL11UaMhSqj-04lqZ1HXpN8E1mErnfjvAkNgpCO9xjG9D2e9AvdN9naT9OMjreTYR-R16DUsX8arPkdhQeLgwn97wL7Qb3-NLb92Y2CeBZ7LnXYtMp49x-bEbZ8H7w0mivCVp-u5-AtF4dQSzo3IjTXRWFxlkIZF0Ym3RQQjCCMdrJGG7ICnpOxh5h4C7tZJws-FKYfFPrrWbitI_vnOv6CvTlOmoTa-Ie3HJRppQCLKtryQvixSP--eGlSl3m9ylc8wTJb5MuMrvKcJl0pCtGwgmd5xuq8YpVYLjNBZ0VV1PWCiUUiS0ZZQTO2opQuC5pywatFMZsvkc5XK6RkRsNQVBqMkBrbJlGGMmOz5ZwmileoXDzejE1HmYUzbstonGpsHZlRJZ13twpeehUPfkwodqTYRFJBpd31jP5NBra-sI6HPI7P4qC4uAyqh5P0HVyDY1iajFaVnfeDC6Nge8L2rfTdWKXC9ITtA57L53ObCNtHeo6w_YXhsWR_BQAA__8ksQXi">