Mesa (master): scons/windows: Enable compute shaders when possible.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Sep 30 14:53:24 UTC 2019


Module: Mesa
Branch: master
Commit: eebe091d292609de8aaf5b5c537d867b23908947
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=eebe091d292609de8aaf5b5c537d867b23908947

Author: pal1000 <liviuprodea at yahoo.com>
Date:   Sun Sep 29 18:35:29 2019 +0300

scons/windows: Enable compute shaders when possible.

Tests done with llvm-config indicate that there are only 2 libraries in
irreader and not in engine, LLVMAsmParser and LLVMIRReader and both of them
are part of coroutines so I replaced irreader with coroutines and added
libraries unique to coroutines.

Reviewed-by: Jose Fonseca <jfonseca at vmware.com>

---

 scons/llvm.py | 27 ++++++++++++++++++++++++++-
 1 file changed, 26 insertions(+), 1 deletion(-)

diff --git a/scons/llvm.py b/scons/llvm.py
index fc128ab1e68..061295d1d79 100644
--- a/scons/llvm.py
+++ b/scons/llvm.py
@@ -108,7 +108,7 @@ def generate(env):
             env.AppendUnique(CXXFLAGS = ['-posix'])
 
         # LIBS should match the output of `llvm-config --libs engine mcjit bitwriter x86asmprinter irreader` for LLVM<=7.0
-        # and `llvm-config --libs engine irreader` for LLVM>=8.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.
         if llvm_version >= distutils.version.LooseVersion('9.0'):
             env.Prepend(LIBS = [
@@ -129,6 +129,31 @@ def generate(env):
                 'LLVMDemangle', 'LLVMGlobalISel', 'LLVMDebugInfoMSF',
                 'LLVMBinaryFormat',
                 'LLVMRemarks', 'LLVMBitstreamReader', 'LLVMDebugInfoDWARF',
+                # Add these libraries to enable ompute shaders support.
+                'LLVMLinker', 'LLVMVectorize', 'LLVMInstrumentation',
+                'LLVMipo', 'LLVMCoroutines',
+            ])
+        elif llvm_version >= distutils.version.LooseVersion('8.0'):
+            env.Prepend(LIBS = [
+                'LLVMX86Disassembler', 'LLVMX86AsmParser',
+                'LLVMX86CodeGen', 'LLVMSelectionDAG', 'LLVMAsmPrinter',
+                'LLVMDebugInfoCodeView', 'LLVMCodeGen',
+                'LLVMScalarOpts', 'LLVMInstCombine',
+                'LLVMTransformUtils',
+                'LLVMBitWriter', 'LLVMX86Desc',
+                'LLVMMCDisassembler', 'LLVMX86Info',
+                'LLVMX86AsmPrinter', 'LLVMX86Utils',
+                'LLVMMCJIT', 'LLVMExecutionEngine', 'LLVMTarget',
+                'LLVMAnalysis', 'LLVMProfileData',
+                'LLVMRuntimeDyld', 'LLVMObject', 'LLVMMCParser',
+                'LLVMBitReader', 'LLVMMC', 'LLVMCore',
+                'LLVMSupport',
+                'LLVMIRReader', 'LLVMAsmParser',
+                'LLVMDemangle', 'LLVMGlobalISel', 'LLVMDebugInfoMSF',
+                'LLVMBinaryFormat',
+                # Add these libraries to enable ompute shaders support.
+                'LLVMLinker', 'LLVMVectorize', 'LLVMInstrumentation',
+                'LLVMipo', 'LLVMCoroutines',
             ])
         elif llvm_version >= distutils.version.LooseVersion('5.0'):
             env.Prepend(LIBS = [




More information about the mesa-commit mailing list