diff options
author | pal1000 <[email protected]> | 2019-03-01 12:30:15 +0200 |
---|---|---|
committer | Dylan Baker <[email protected]> | 2019-09-30 09:09:00 -0700 |
commit | dc0995669de6e177210d6526fc7eac9dcc47934c (patch) | |
tree | 34e9e7023697bfc336d38ffef63bfd63b512de85 /scons/gallium.py | |
parent | 434ab094c0e2667fac409dee24fe7b581997bcf5 (diff) |
scons: Fix MSYS2 Mingw-w64 build.
Reviewed-by: Jose Fonseca <[email protected]>
This patch is based on https://github.com/msys2/MINGW-packages/blob/28e3f85e09b6947ea80036c49f6c38f1394f93ca/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.
(cherry picked from commit ffb0d3a25c60dd7fc5cb1f2c33c2977b245b5fee)
Diffstat (limited to 'scons/gallium.py')
-rwxr-xr-x | scons/gallium.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/scons/gallium.py b/scons/gallium.py index 21197c8d0d1..3bc0b8d7324 100755 --- a/scons/gallium.py +++ b/scons/gallium.py @@ -237,6 +237,9 @@ def generate(env): hosthost_platform = host_platform.system().lower() if hosthost_platform.startswith('cygwin'): hosthost_platform = 'cygwin' + # Avoid spurious crosscompilation in MSYS2 environment. + if hosthost_platform.startswith('mingw'): + hosthost_platform = 'windows' host_machine = os.environ.get('PROCESSOR_ARCHITEW6432', os.environ.get('PROCESSOR_ARCHITECTURE', host_platform.machine())) host_machine = { 'x86': 'x86', |