[Mesa-dev] [PATCH v4 12/18] configure.ac: Move llvm_set_environment_variables higher.

Emil Velikov emil.l.velikov at gmail.com
Wed Oct 19 13:11:03 UTC 2016


On 16 October 2016 at 01:20, Tobias Droste <tdroste at gmx.de> wrote:
> This moves the function to get the LLVM environment variables higher
> in the file. It still needs to be below the "--enable-opencl" because
> it uses $enable_opencl.
> It can be called without condition now as it only throws errors if
> openCL is enabled.
>
> This patch just prepares the next patch.
>
This will cause some nuisance since it will cause us to link (et al.)
against LLVM even if we don't need to.

For example: user has llvm-config in their path, which will lead to
LLVM_CONFIG and LLVM_LDFLAGS being set and shortly after MESA_LLVM=1.
The latter of which controlling the HAVE_MESA_LLVM conditional in the
makefiles.

Before - --disable-gallium-llvm > LLVM_* variables are not set,
HAVE_MESA_LLVM is false and modules don't link against LLVM.
After --disable-gallium-llvm > LLVM_* variables _are_ set,
HAVE_MESA_LLVM is true and (nearly) everyone links against LLVM.

The easier way to untangle is to s/HAVE_MESA_LLVM/USE_MESA_LLVM/ (for
clarity) in the makefiles and change the conditional to be set when a)
we have llvm and b) enable-gallium-llvm is set.

You can push the AC_CONDITIONAL line further down the file if/as needed.

Emil


More information about the mesa-dev mailing list