diff options
Diffstat (limited to 'mingw-posix.patch')
-rw-r--r-- | mingw-posix.patch | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/mingw-posix.patch b/mingw-posix.patch new file mode 100644 index 000000000000..4e8adc641c90 --- /dev/null +++ b/mingw-posix.patch @@ -0,0 +1,22 @@ +diff --git a/scons/llvm.py b/scons/llvm.py +index a84ad51..8ef7a84 100644 +--- a/scons/llvm.py ++++ b/scons/llvm.py +@@ -32,6 +32,7 @@ import os.path + import re + import sys + import distutils.version ++import subprocess + + import SCons.Errors + import SCons.Util +@@ -123,7 +124,8 @@ def generate(env): + 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' ++ if subprocess.call(env['CXX'] + '-posix -v', shell=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE) == 0: ++ env['CXX'] = env['CXX'] + '-posix' + elif llvm_version >= distutils.version.LooseVersion('4.0'): + env.Prepend(LIBS = [ + 'LLVMX86Disassembler', 'LLVMX86AsmParser', |