X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=scons%2Fllvm.py;h=37c503ec986dd959104dae30392979bef7c3b8fc;hb=b01ffb12ed82dcf435b186e2aff35e344a8a6ebe;hp=7b266502907fd47be168038d1d8a8f717a7ebe0d;hpb=8c981b94dc0ff30fe2b2786b1d5671be7d1610b7;p=mesa.git diff --git a/scons/llvm.py b/scons/llvm.py index 7b266502907..37c503ec986 100644 --- a/scons/llvm.py +++ b/scons/llvm.py @@ -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'):