Search code examples
gccclangllvmclang++llvm-clang

Why does LLVM projects use GCC Headers


I am looking at a project that is built with Clang but it needs GCC headers.

Why would a project require both Clang and GCC headers?


Solution

  • By default, clang builds with the standard library installed on the system, so objects can be linked with libraries/programs built by other compilers. If you have installed libc++, you can use it with the flag -stdlib=libc++.

    For more information have a look at the documentation.