diff options
author | Jose Fonseca <jfonseca@vmware.com> | 2018-06-01 19:57:31 +0100 |
---|---|---|
committer | Jose Fonseca <jfonseca@vmware.com> | 2018-06-02 09:58:50 +0100 |
commit | 8841c2cda51d86eafb855295e61810627a0a8bfe (patch) | |
tree | ab021753d3ab6f862233ef5a631e73b7ec4827dd /scons | |
parent | 64e619674e9b6b9c8101353cd8cda6e064d84199 (diff) |
scons: Fix MinGW cross compilation with LLVM 5.0.
LLVM 5.0 requires additional Win32 libraries, and MinGW with pthreads.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Diffstat (limited to 'scons')
-rw-r--r-- | scons/llvm.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/scons/llvm.py b/scons/llvm.py index 79118be371d..a34edfb4b67 100644 --- a/scons/llvm.py +++ b/scons/llvm.py @@ -123,6 +123,10 @@ def generate(env): 'LLVMDemangle', 'LLVMGlobalISel', 'LLVMDebugInfoMSF', 'LLVMBinaryFormat', ]) + if env['platform'] == 'windows' and env['crosscompile']: + # LLVM 5.0 requires MinGW w/ pthreads due to use of std::thread and friends. + assert env['gcc'] + env['CXX'] = env['CXX'] + '-posix' elif llvm_version >= distutils.version.LooseVersion('4.0'): env.Prepend(LIBS = [ 'LLVMX86Disassembler', 'LLVMX86AsmParser', @@ -211,8 +215,11 @@ def generate(env): 'imagehlp', 'psapi', 'shell32', - 'advapi32' + 'advapi32', + 'ole32', + 'uuid', ]) + if env['msvc']: # Some of the LLVM C headers use the inline keyword without # defining it. |