autoconf
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Using LLVM with Autotools


From: Russell Wallace
Subject: Using LLVM with Autotools
Date: Thu, 24 Mar 2016 15:05:02 +0000

I'm writing a C++ program that needs to compile and link with LLVM, and
trying to figure out how to build it with autotools.

The good news is, llvm-config will supply the relevant compiler and linker
flags.

The bad news is, the llvm-config in the current path is not likely to be
the right one (e.g. Ubuntu 14.04 thinks LLVM 3.4 is the latest version
whereas it's actually up to 3.8, and the differences between versions do
matter) so the user or packager needs to supply a path to the correct
llvm-config. What's the best way to do this?

I was given a link to a macro that tries to do this...
https://github.com/google/autofdo/blob/master/m4/ax_llvm.m4
https://github.com/google/autofdo/pull/30/commits/0029f4be825f851b9d99bcd19dcb34fd59f1775e
... But it doesn't work, and I don't know enough M4 to figure out why.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]