[Mesa-dev] [PATCH] scons: Use LLVM shared library if found.

Jose Fonseca jfonseca at vmware.com
Fri May 17 07:44:59 PDT 2013


Vinson,

Why is this necessary?

(I'd prefer that LLVM is statically linked by default. )

Jose

----- Original Message -----
> This patch fixes SCons builds on Fedora 18.
> 
> Signed-off-by: Vinson Lee <vlee at freedesktop.org>
> ---
>  scons/llvm.py | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
> 
> diff --git a/scons/llvm.py b/scons/llvm.py
> index 7cd609c..432ece6 100644
> --- a/scons/llvm.py
> +++ b/scons/llvm.py
> @@ -198,7 +198,15 @@ def generate(env):
>              if llvm_version >= distutils.version.LooseVersion('3.2'):
>                  env.Append(CXXFLAGS = ('-fno-rtti',))
>  
> -            env.ParseConfig('llvm-config --libs ' + ' '.join(components))
> +            llvm_shared_library = os.path.join(
> +                env.backtick('llvm-config --libdir').strip(),
> +                'libLLVM-%s%s' % (llvm_version, env['SHLIBSUFFIX'])
> +            )
> +            if os.path.exists(llvm_shared_library):
> +                env.Append(LIBS = ['LLVM-%s' % llvm_version])
> +            else:
> +                env.ParseConfig('llvm-config --libs ' + '
> '.join(components))
> +
>              env.ParseConfig('llvm-config --ldflags')
>          except OSError:
>              print 'scons: llvm-config version %s failed' % llvm_version
> --
> 1.8.2.1
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
> 


More information about the mesa-dev mailing list