scons: fix build with llvm 9.

Submitted by Jose Fonseca on May 24, 2019, 8:54 a.m.

Details

Message ID SN2PR05MB2461BFE15D95C8C0560AC1A4B6020@SN2PR05MB2461.namprd05.prod.outlook.com
State New
Headers show
Series "scons: fix build with llvm 9." ( rev: 2 ) in Mesa

Not browsing as part of any series.

Commit Message

Jose Fonseca May 24, 2019, 8:54 a.m.
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>

Patch hide | download patch | download mbox

diff --git a/scons/llvm.py b/scons/llvm.py
index a84ad51d97a..bf9666459c6 100644
--- a/scons/llvm.py
+++ b/scons/llvm.py
@@ -260,7 +260,10 @@  def generate(env):
             if '-fno-rtti' in cxxflags:
                 env.Append(CXXFLAGS = ['-fno-rtti'])

-            components = ['engine', 'mcjit', 'bitwriter', 'x86asmprinter', 'mcdisassembler', 'irreader']
+            if llvm_version < distutils.version.LooseVersion('9.0'):
+               components = ['engine', 'mcjit', 'bitwriter', 'x86asmprinter', 'mcdisassembler', 'irreader']
+            else:
+               components = ['engine', 'mcjit', 'bitwriter', 'mcdisassembler', 'irreader']

             env.ParseConfig('%s --libs ' % llvm_config + ' '.join(components))
             env.ParseConfig('%s --ldflags' % llvm_config)