scons: Fix MSYS2 Mingw-w64 build.
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
This patch is based on 28e3f85e09/mingw-w64-mesa/link-ole32.patch
but with tweaks to avoid MSVC build break when applied.
v2: Create Mingw platform alias pointing to windows host platform define to avoid spurious crosscompilation;
v3: Fix obviously wrong compiler flags for swr driver;
v4: Update original patch URL because it has been relocated;
v5: Don't bother patching autools stuff as it's not used by MSYS2 Mingw-w64 build and it's days are numbered anyway;
v6: After Mingw posix flag fix in 295851eb things are far simpler as we don't need more linking of uuid, ole32, version and shell32 than what is already in place.
This commit is contained in:
@@ -30,6 +30,7 @@ Tool-specific initialization for LLVM
|
||||
import os
|
||||
import os.path
|
||||
import re
|
||||
import platform as host_platform
|
||||
import sys
|
||||
import distutils.version
|
||||
|
||||
@@ -192,6 +193,12 @@ def generate(env):
|
||||
'uuid',
|
||||
])
|
||||
|
||||
# Mingw-w64 zlib is required when building with LLVM support in MSYS2 environment
|
||||
if host_platform.system().lower().startswith('mingw'):
|
||||
env.Append(LIBS = [
|
||||
'z',
|
||||
])
|
||||
|
||||
if env['msvc']:
|
||||
# Some of the LLVM C headers use the inline keyword without
|
||||
# defining it.
|
||||
|
Reference in New Issue
Block a user