Mesa (mesa_7_7_branch): scons: Make it work with MinGW build of LLVM 2.6.

Jose Fonseca jrfonseca at kemper.freedesktop.org
Fri Dec 11 12:33:47 UTC 2009


Module: Mesa
Branch: mesa_7_7_branch
Commit: 8c981b94dc0ff30fe2b2786b1d5671be7d1610b7
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8c981b94dc0ff30fe2b2786b1d5671be7d1610b7

Author: José Fonseca <jfonseca at vmware.com>
Date:   Wed Nov 25 18:06:12 2009 +0000

scons: Make it work with MinGW build of LLVM 2.6.

LLVM 2.5 is no longer supported on windows.

---

 scons/llvm.py |   52 +++++++++++++++++++++++++++-------------------------
 1 files changed, 27 insertions(+), 25 deletions(-)

diff --git a/scons/llvm.py b/scons/llvm.py
index 73e9310..7b26650 100644
--- a/scons/llvm.py
+++ b/scons/llvm.py
@@ -58,45 +58,47 @@ def generate(env):
 
         env.PrependENVPath('PATH', llvm_bin_dir)
 
-    if env['msvc']:
+    if env['platform'] == 'windows':
         # XXX: There is no llvm-config on Windows, so assume a standard layout
         if llvm_dir is not None:
             env.Prepend(CPPPATH = [os.path.join(llvm_dir, 'include')])
+            env.AppendUnique(CPPDEFINES = [
+                '__STDC_LIMIT_MACROS', 
+                '__STDC_CONSTANT_MACROS',
+            ])
             env.Prepend(LIBPATH = [os.path.join(llvm_dir, 'lib')])
             env.Prepend(LIBS = [
+                'LLVMX86AsmParser',
+                'LLVMX86AsmPrinter',
+                'LLVMX86CodeGen',
+                'LLVMX86Info',
+                'LLVMLinker',
+                'LLVMipo',
+                'LLVMInterpreter',
+                'LLVMInstrumentation',
+                'LLVMJIT',
+                'LLVMExecutionEngine',
+                'LLVMDebugger',
                 'LLVMBitWriter',
-                'LLVMCore',
-                'LLVMSupport',
-                'LLVMSystem',
-                'LLVMSupport',
-                'LLVMSystem',
-                'LLVMCore',
-                'LLVMCodeGen',
+                'LLVMAsmParser',
+                'LLVMArchive',
+                'LLVMBitReader',
                 'LLVMSelectionDAG',
                 'LLVMAsmPrinter',
-                'LLVMBitReader',
-                'LLVMBitWriter',
-                'LLVMTransformUtils',
-                'LLVMInstrumentation',
+                'LLVMCodeGen',
                 'LLVMScalarOpts',
-                'LLVMipo',
-                'LLVMHello',
-                'LLVMLinker',
-                'LLVMAnalysis',
+                'LLVMTransformUtils',
                 'LLVMipa',
-                'LLVMX86CodeGen',
-                'LLVMX86AsmPrinter',
-                'LLVMExecutionEngine',
-                'LLVMInterpreter',
-                'LLVMJIT',
+                'LLVMAnalysis',
                 'LLVMTarget',
-                'LLVMAsmParser',
-                'LLVMDebugger',
-                'LLVMArchive',
+                'LLVMMC',
+                'LLVMCore',
+                'LLVMSupport',
+                'LLVMSystem',
                 'imagehlp',
                 'psapi',
             ])
-            env['LLVM_VERSION'] = '2.5'
+            env['LLVM_VERSION'] = '2.6'
         return
     elif env.Detect('llvm-config'):
         version = env.backtick('llvm-config --version').rstrip()




More information about the mesa-commit mailing list