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

mats petersson via llvm-dev
Mon, 14 Sep 2015 20:31:25 -0000

So, I just raised a related issue on the IRC, and he conclusion was that
this email thread is probably the right place to bring this up...

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"?

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.


--
Mats

On 10 August 2015 at 21:34, Hans Wennborg via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> On Sat, Aug 8, 2015 at 4:02 AM, David Chisnall via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
> > On 7 Aug 2015, at 23:17, Tom Stellard via llvm-dev <
> llvm-dev at lists.llvm.org> wrote:
> >>
> >> I don't have any strong opinions.  Did this actually break
anyone's use
> >> case or is it just a hypothetical problem?  It doesn't seem
like there
> >> is much value in fixing this until llvm-config is also fixed.
> >
> > The current 3.7 code breaks for the codebase that I use for teaching.
> It uses RTTI in the AST construction, so can’t be compiled with -fno-rtti,
> but does need to use Module, IRBuilder, and friends, so not being able to
> link against an LLVM that’s built without RTTI is annoying (it means that
> the students can’t use LLVM packages on any OS).
>
> This sounds pretty unfortunate, and if David is running into it then
> others probably will too (and those users might find the errors more
> confusing).
>
> If this is possible to fix by adding anchor functions to the various
> Instruction subclasses, that seems like a good fix (new functions is
> probably better than adding out-of-line ctors/dtors).
>
> In any case, to get such a fix merged to 3.7, the code owner would
> need to approve it. I don't think there is a specific owner for the
> IR, which means it falls under Chris's catch-all, so I'd like to
hear
> what he thinks.
>
> (This sub-thread started here:
> http://lists.llvm.org/pipermail/llvm-dev/2015-August/089010.html)
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org         http://llvm.cs.uiuc.edu
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20150914/7b13142c/attachment.html>