Skip to content

https://libc.llvm.org/compiler_support.html is not clear about building libc vs building against libc headers #114861

@frobtech

Description

@frobtech

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions