llvmpipe: new comment
[mesa.git] / scons / llvm.py
index 7b266502907fd47be168038d1d8a8f717a7ebe0d..37c503ec986dd959104dae30392979bef7c3b8fc 100644 (file)
@@ -65,6 +65,7 @@ def generate(env):
             env.AppendUnique(CPPDEFINES = [
                 '__STDC_LIMIT_MACROS', 
                 '__STDC_CONSTANT_MACROS',
+                'HAVE_STDINT_H',
             ])
             env.Prepend(LIBPATH = [os.path.join(llvm_dir, 'lib')])
             env.Prepend(LIBS = [
@@ -98,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'):