[Mesa-dev] [PATCH 2/6] configure.ac: Only set LLVM_LIBS if LLVM is used

Tobias Droste tdroste at gmx.de
Thu Dec 8 22:00:22 UTC 2016


Am Donnerstag, 8. Dezember 2016, 17:06:16 CET schrieb Emil Velikov:
> On 8 December 2016 at 02:03, Tobias Droste <tdroste at gmx.de> wrote:
> > This renames llvm_check_version_for to llvm_require_version and let it
> > set a variable to mark that LLVM will be used.
> > 
> > Use this to make a usefull configure output and to only check if the
> > libs are found in LLVM if it is actually used.
> > 
> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99010
> > 
> > Signed-off-by: Tobias Droste <tdroste at gmx.de>
> > ---
> > 
> >  configure.ac | 33 ++++++++++++++++++++++++---------
> >  1 file changed, 24 insertions(+), 9 deletions(-)
> > 
> > diff --git a/configure.ac b/configure.ac
> > index 1499380c45..a209d87e62 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -998,13 +998,17 @@ llvm_set_environment_variables() {
> > 
> >          DEFINES="${DEFINES} -DHAVE_LLVM=0x0$LLVM_VERSION_INT
> >          -DMESA_LLVM_VERSION_PATCH=$LLVM_VERSION_PATCH" FOUND_LLVM=yes
> > 
> > +        USE_LLVM=no
> > 
> >      else
> >      
> >          FOUND_LLVM=no
> > 
> > +        USE_LLVM=no
> > 
> >          LLVM_VERSION_INT=0
> >      
> >      fi
> >  
> >  }
> > 
> > -llvm_check_version_for() {
> > +llvm_require_version() {
> > +    USE_LLVM=yes
> > +
> 
> I'm in favour of the rename, but please keep it separate.
> On the output topic... I'm leaning more than my original suggestion
> "found, using in gallium, using in vulkan, etc" was an overkill.
> 
> Mostly because we do not allow configuration (if we did the
> combinatoric explosion will be even greater than what we have now) for
> LLVM-less gallium and LLVM-full radv and vice-versa.
> 
> Unless you/others are fond of the I'd drop it.
> 
> Thanks
> Emil

I kept it in one patch because it slightly changes what this function does so 
I figured a rename would be appropriate.
I actually need this for patch 3 to work.

After patch 4 there is only a separate output for gallium, because right now 
you can actually build gallium without llvm and radv with llvm.
But you can't build radv or anything other that uses llvm without llvm.

Tobias


More information about the mesa-dev mailing list