<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/114861>114861</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
https://libc.llvm.org/compiler_support.html is not clear about building libc vs building against libc headers
</td>
</tr>
<tr>
<th>Labels</th>
<td>
libc
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
nickdesaulniers
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
frobtech
</td>
</tr>
</table>
<pre>
The documentation page on compiler support is not very clear. The only things it mentions explicitly are implementation issues, indicating that it may only be addressing what compilers can be used to build libc. For libc more than anything else, it's important to distinguish requirements for building libc from requirements for compiling against its headers and linking against its library artifacts. Every serious libc supports users compiling against headers and linking against libraries to use a very wide variety of compilers and not a specific supported list, but rather any standards-conforming compiler. The set of compilers supported for building libc itself can be much more constrained.
It is reasonable for libc to largely follow libc++'s compatibility requirements as to building the library itself. For using the headers and libraries, even libc++ does not claim such strict requirements. Rather, they say that there are no guarantees about compilers that aren't being tested by the project.
In the context of libc, unlike libc++, there is really no need to use anything in public headers that can't be widely compatible with any compiler. The best policy for users is to have headers likely to work with just about any compiler in any mode.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8VU2PIjkM_TXFxRoE1dDAgcNMzyLtdbX3lZMYytOphI0deurfr5KqoptuaSXER2Ken9-zXSjCl0B0bLY_mrYNbF8dCWYfmJI0bdtsfy4waxfT8ZyiUbLdwkQ3HP_uCFy0uaegqBwDXPFCEAPY2F_ZUwLJ12tMCiwQosKN0gDWE6YllH_H4AfQjsNFgBUKEMcgQL-vni2rHwATAfdXT-9ZWCSTNO0LcHBsUTlcQDvUioHDCGsI0LlEIuX6rVzPtAQshhKQhRxoBJPZO_Bs7BLgFFP9Cn1MVHADYBgqSyAvVBNr0-6kEItJMWgBcSyFSWbpING_mVPlLHCOacxQECryOcX-a8xIrwThBTlIqUegI3SFMobCMLx-vvdsEqYilPIZrcoS4I8qtFDimGVMO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