scons/windows: Fix build with LLVM>=8
authorProdea Alexandru-Liviu <liviuprodea@yahoo.com>
Fri, 4 Oct 2019 13:48:08 +0000 (13:48 +0000)
committerJose Fonseca <jfonseca@vmware.com>
Fri, 4 Oct 2019 13:48:08 +0000 (13:48 +0000)
Fixes eebe091d292609de8aaf5b5c537d867b23908947
("scons/windows: Enable compute shaders when possible.")
Signed-off-by: Prodea Alexandru-Liviu <liviuprodea@yahoo.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
scons/llvm.py

index 061295d1d7933ba319cb81a41af3946a71c3943f..6d04bd555223c5e388c7d14390c77de910f34f10 100644 (file)
@@ -109,7 +109,8 @@ def generate(env):
 
         # LIBS should match the output of `llvm-config --libs engine mcjit bitwriter x86asmprinter irreader` for LLVM<=7.0
         # and `llvm-config --libs engine coroutines` for LLVM>=8.0
 
         # LIBS should match the output of `llvm-config --libs engine mcjit bitwriter x86asmprinter irreader` for LLVM<=7.0
         # and `llvm-config --libs engine coroutines` for LLVM>=8.0
-        # LLVMAggressiveInstCombine library part of engine component can be safely omitted as it's not used.
+        # LLVMAggressiveInstCombine library part of engine component since LLVM 6 is only needed by Mesa3D for LLVM>=8.
+        # While not directly needed by Mesa3D, this library is needed by LLVMipo which is part of coroutines component.
         if llvm_version >= distutils.version.LooseVersion('9.0'):
             env.Prepend(LIBS = [
                 'LLVMX86Disassembler', 'LLVMX86AsmParser',
         if llvm_version >= distutils.version.LooseVersion('9.0'):
             env.Prepend(LIBS = [
                 'LLVMX86Disassembler', 'LLVMX86AsmParser',
@@ -130,8 +131,8 @@ def generate(env):
                 'LLVMBinaryFormat',
                 'LLVMRemarks', 'LLVMBitstreamReader', 'LLVMDebugInfoDWARF',
                 # Add these libraries to enable ompute shaders support.
                 'LLVMBinaryFormat',
                 'LLVMRemarks', 'LLVMBitstreamReader', 'LLVMDebugInfoDWARF',
                 # Add these libraries to enable ompute shaders support.
-                'LLVMLinker', 'LLVMVectorize', 'LLVMInstrumentation',
-                'LLVMipo', 'LLVMCoroutines',
+                'LLVMAggressiveInstCombine','LLVMLinker', 'LLVMVectorize',
+                'LLVMInstrumentation', 'LLVMipo', 'LLVMCoroutines',
             ])
         elif llvm_version >= distutils.version.LooseVersion('8.0'):
             env.Prepend(LIBS = [
             ])
         elif llvm_version >= distutils.version.LooseVersion('8.0'):
             env.Prepend(LIBS = [
@@ -152,8 +153,8 @@ def generate(env):
                 'LLVMDemangle', 'LLVMGlobalISel', 'LLVMDebugInfoMSF',
                 'LLVMBinaryFormat',
                 # Add these libraries to enable ompute shaders support.
                 'LLVMDemangle', 'LLVMGlobalISel', 'LLVMDebugInfoMSF',
                 'LLVMBinaryFormat',
                 # Add these libraries to enable ompute shaders support.
-                'LLVMLinker', 'LLVMVectorize', 'LLVMInstrumentation',
-                'LLVMipo', 'LLVMCoroutines',
+                'LLVMAggressiveInstCombine', 'LLVMLinker', 'LLVMVectorize',
+                'LLVMInstrumentation', 'LLVMipo', 'LLVMCoroutines',
             ])
         elif llvm_version >= distutils.version.LooseVersion('5.0'):
             env.Prepend(LIBS = [
             ])
         elif llvm_version >= distutils.version.LooseVersion('5.0'):
             env.Prepend(LIBS = [