[Mesa-dev] [PATCH 08/12] configure.ac: deprecate --with-llvm-prefix

Emil Velikov emil.l.velikov at gmail.com
Wed Nov 7 18:51:27 UTC 2018


On Wed, 7 Nov 2018 at 18:39, Jan Vesely <jan.vesely at rutgers.edu> wrote:
>
> On Tue, 2018-11-06 at 12:09 +0000, Emil Velikov wrote:
> > On Thu, 1 Nov 2018 at 16:13, Michel Dänzer <michel at daenzer.net> wrote:
> > > On 2018-11-01 5:03 p.m., Jan Vesely wrote:
> > > > On Wed, 2018-10-31 at 18:40 +0000, Emil Velikov wrote:
> > > > > On Wed, 31 Oct 2018 at 17:41, Jan Vesely <jan.vesely at rutgers.edu> wrote:
> > > > > > On Wed, 2018-10-31 at 17:22 +0000, Emil Velikov wrote:
> > > > > > > On Wed, 31 Oct 2018 at 16:24, Michel Dänzer <michel at daenzer.net> wrote:
> > > > > > > > On 2018-10-31 5:19 p.m., Jan Vesely wrote:
> > > > > > > > > This might be a stupid question; is the LLVM_CONFIG env var remembered
> > > > > > > > > between reconfigure (touch configure.ac; make) or do I need to provide
> > > > > > > > > it explicitly every time configure is run?
> > > > > > > >
> > > > > > > > I don't know the answer, but agree that would be a minimum requirement
> > > > > > > > for this change.
> > > > > > > >
> > > > > > > Nope, yet it's not really a minimum. LLVM_CONFIG has been around for
> > > > > > > years, it will work for any Mesa checkout since its inception.
> > > > > > > You can safely bisect Mesa and things will just work.
> > > > > >
> > > > > > The question is; Do I have to do "LLVM_CONFIG=..." make every time
> > > > > > bisect changes configure.ac?
> > > > > >
> > > > > You can do (although there's other options if this one seems weird)
> > > > >
> > > > > $ LLVM_CONFIG=... ../autogen.sh
> > > >
> > > > That does not answer my question.
> > > >
> > > > suppose the following sequence:
> > > > $ LLVM_CONFIG=/usr/local/llvm-4/bin/llvm-config ../mesa-src/autogen.sh
> > > > ...
> > > >         llvm:            yes
> > > >         llvm-config:     /usr/local/llvm-4/bin/llvm-config
> > > >         llvm-version:    4.0.1
> > > > ...
> > > > $ make -j128
> > > > $ touch ../mesa-src/configure.ac
> > > > $ make -j128
> > > > ...
> > > >         llvm:            yes
> > > >         llvm-config:     /usr/bin/llvm-config
> > > >         llvm-version:    7.0.0
> > > > ...
> > > >
> > > > the second reconfigure silently reverted back to system default llvm.
> > > > That's a loss of capabilty for me.
> > >
> > > Thanks for checking, Jan. That's a NAK from me for this patch in the
> > > current form.
> > >
> > > FWIW, LLVM_CONFIG is available in the generated Makefiles, so it might
> > > not be too hard to make this work with the environment variable. I don't
> > > know the preferred way to do that however.
> > >
> > Right, I misread the usecase :-( Sorry about that.
> > The following works like a charm:
> >
> > .../autogen.sh ac_cv_path_LLVM_CONFIG=/...
> > make
> > touch .../configure.ac
> > make
>
> ouch, that's rather ugly. What is the reason to prefer env var vs.
> proper option (like --with-llvm-config)?
> meson also seems to prefer env var for some reason.
> I don't mind spending the time to send out the patches, but I'd like to
> make sure it's not a wasted effort.
>
>From a general distribution POV, adding llvm-config to every project
'feels' wasteful IMHO. Even if we ignore the "feels" part, there's the
aspect of duplicating the same code in XX projects.
Which with due time will result in a behavioural shift as copies diverge.

In Mesa the toggle conflicts, in some weird ways, with the existing
--with-clang-libdir

Now stepping back to look at the big picture:
Ideally LLVM/Clang would provide .pc files like nearly every project
in wild. LLVM 7.0 doesn't seem to be shipping any, so we need [ideally
very small] solution in the meanwhile.

HTH
Emil


More information about the mesa-dev mailing list