Mesa (master): scons: LLVM <-> MSVC integration tweaks.

Jose Fonseca jrfonseca at kemper.freedesktop.org
Sun Jan 10 11:22:33 UTC 2010


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

Author: José Fonseca <jfonseca at vmware.com>
Date:   Sun Jan 10 10:51:42 2010 +0000

scons: LLVM <-> MSVC integration tweaks.

---

 scons/llvm.py |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/scons/llvm.py b/scons/llvm.py
index 5b9c82f..37c503e 100644
--- a/scons/llvm.py
+++ b/scons/llvm.py
@@ -99,6 +99,16 @@ def generate(env):
                 'imagehlp',
                 'psapi',
             ])
+            if env['msvc']:
+                # Some of the LLVM C headers use the inline keyword without
+                # defining it.
+                env.Append(CPPDEFINES = [('inline', '__inline')])
+                if env['debug']:
+                    # LLVM libraries are static, build with /MT, and they
+                    # automatically link agains LIBCMT. When we're doing a
+                    # debug build we'll be linking against LIBCMTD, so disable
+                    # that.
+                    env.Append(LINKFLAGS = ['/nodefaultlib:LIBCMT'])
             env['LLVM_VERSION'] = '2.6'
         return
     elif env.Detect('llvm-config'):




More information about the mesa-commit mailing list