scons/windows: Support build with LLVM 10.
authorpal1000 <liviuprodea@yahoo.com>
Sat, 11 Apr 2020 08:16:41 +0000 (11:16 +0300)
committerMarge Bot <eric+marge@anholt.net>
Tue, 14 Apr 2020 08:40:56 +0000 (08:40 +0000)
LLVM engine component contains 2 new libraries, LLVMCFGuard and LLVMTextAPI.
Without them build fails like in this run: https://ci.appveyor.com/project/Alexpux/mingw-packages/builds/32102425/job/wkmb4gimfqkkb3cg

Cc: <mesa-stable@lists.freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4521>

scons/llvm.py

index 6d04bd555223c5e388c7d14390c77de910f34f10..dac3555995bc52f26a8c93226bb42ca65b1f6583 100644 (file)
@@ -111,7 +111,30 @@ def generate(env):
         # and `llvm-config --libs engine coroutines` for LLVM>=8.0
         # 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'):
+        if llvm_version >= distutils.version.LooseVersion('10.0'):
+            env.Prepend(LIBS = [
+                'LLVMX86Disassembler', 'LLVMX86AsmParser',
+                'LLVMX86CodeGen', 'LLVMSelectionDAG', 'LLVMAsmPrinter',
+                'LLVMDebugInfoCodeView', 'LLVMCodeGen',
+                'LLVMScalarOpts', 'LLVMInstCombine',
+                'LLVMTransformUtils',
+                'LLVMBitWriter', 'LLVMX86Desc',
+                'LLVMMCDisassembler', 'LLVMX86Info',
+                'LLVMX86Utils',
+                'LLVMMCJIT', 'LLVMExecutionEngine', 'LLVMTarget',
+                'LLVMAnalysis', 'LLVMProfileData',
+                'LLVMRuntimeDyld', 'LLVMObject', 'LLVMMCParser',
+                'LLVMBitReader', 'LLVMMC', 'LLVMCore',
+                'LLVMSupport',
+                'LLVMIRReader', 'LLVMAsmParser',
+                'LLVMDemangle', 'LLVMGlobalISel', 'LLVMDebugInfoMSF',
+                'LLVMBinaryFormat',
+                'LLVMRemarks', 'LLVMBitstreamReader', 'LLVMDebugInfoDWARF',
+                'LLVMAggressiveInstCombine','LLVMLinker', 'LLVMVectorize',
+                'LLVMInstrumentation', 'LLVMipo', 'LLVMCoroutines',
+                'LLVMCFGuard', 'LLVMTextAPI',
+            ])
+        elif llvm_version >= distutils.version.LooseVersion('9.0'):
             env.Prepend(LIBS = [
                 'LLVMX86Disassembler', 'LLVMX86AsmParser',
                 'LLVMX86CodeGen', 'LLVMSelectionDAG', 'LLVMAsmPrinter',