[llvm-dev] [LLVMdev] Ideas for making llvm-config --cxxflags more useful

David Chisnall via llvm-dev llvm-dev at lists.llvm.org
Tue Sep 15 01:20:01 PDT 2015


On 14 Sep 2015, at 21:31, mats petersson <mats at planetcatfish.com> wrote:
> 
> Would it be possible to make llvm-config --cxxflags actually just produce flags essential to compilinging and linking some arbitrary source outside of llvm, without a strict requirement of "identical flags to the ones used by the llvm Makefileā€?

It would certainly be a good idea.

> In my case, the main concern is that CXX in my Makefile needs to match that which was used to build llvm, since llvm-config --cxxflags produces -Wfoo and -Wbar that is useful for compiler X (clang in my case) but doesn't "work" in compiler Y (e.g. some version of gcc). So it's required for my project (that lives outside the llvm tree at the moment) to know which compiler was used to build llvm.

If those flags silence spurious warnings in headers, then we should probably silence them with a pragma, not a compiler flag, and only in the relevant headers.

David



More information about the llvm-dev mailing list