scons: For MinGW use -posix flag.
authorMichel Zou <xantares09@hotmail.com>
Fri, 24 May 2019 10:32:01 +0000 (12:32 +0200)
committerJose Fonseca <jfonseca@vmware.com>
Fri, 24 May 2019 11:18:40 +0000 (12:18 +0100)
Signed-off-by: Jose Fonseca <jfonseca@vmware.com>
scons/llvm.py

index a84ad51d97a7d06af1079dbc0ad4ff89524ac91f..7ebcaf1c58c490669f456fbce43b0c9be30678bc 100644 (file)
@@ -123,7 +123,7 @@ 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'
+                env.AppendUnique(CXXFLAGS = ['-posix'])
         elif llvm_version >= distutils.version.LooseVersion('4.0'):
             env.Prepend(LIBS = [
                 'LLVMX86Disassembler', 'LLVMX86AsmParser',