diff options
author | pal1000 <[email protected]> | 2019-03-01 12:30:15 +0200 |
---|---|---|
committer | Jose Fonseca <[email protected]> | 2019-09-29 10:57:16 +0100 |
commit | ffb0d3a25c60dd7fc5cb1f2c33c2977b245b5fee (patch) | |
tree | b9ea3ea803eb30902fde28bebd4766d8cb500280 /src/gallium/drivers | |
parent | bcb4dfb14ba1cbbbd43cb6466fb7f73e5dd98513 (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.
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/swr/SConscript | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/swr/SConscript b/src/gallium/drivers/swr/SConscript index 61432a0c342..1230cbb5b77 100644 --- a/src/gallium/drivers/swr/SConscript +++ b/src/gallium/drivers/swr/SConscript @@ -214,7 +214,7 @@ env.Prepend(CPPPATH = [ envavx = env.Clone() envavx.Append(CPPDEFINES = ['KNOB_ARCH=KNOB_ARCH_AVX']) -if env['platform'] == 'windows': +if env['msvc']: envavx.Append(CCFLAGS = ['/arch:AVX']) else: envavx.Append(CCFLAGS = ['-mavx']) @@ -230,7 +230,7 @@ env.Alias('swrAVX', swrAVX) envavx2 = env.Clone() envavx2.Append(CPPDEFINES = ['KNOB_ARCH=KNOB_ARCH_AVX2']) -if env['platform'] == 'windows': +if env['msvc']: envavx2.Append(CCFLAGS = ['/arch:AVX2']) else: envavx2.Append(CCFLAGS = ['-mavx2', '-mfma', '-mbmi2', '-mf16c']) |