From 30d8c90f7719aec667d2147f170376481056ca1d Mon Sep 17 00:00:00 2001 From: kamgha Date: Sun, 13 Sep 2020 12:04:06 +0200 Subject: [PATCH] makepanda: MSVC fix generating non-SSE2 code for x86 Closes #1018 Fixes #1017 --- makepanda/makepanda.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index 8f04251970..c00a6203b1 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -1313,8 +1313,12 @@ def CompileCxx(obj,src,opts): cmd += "/Zc:threadSafeInit- " cmd += "/Fo" + obj + " /nologo /c" - if GetTargetArch() != 'x64' and (not PkgSkip("SSE2") or 'SSE2' in opts): - cmd += " /arch:SSE2" + if GetTargetArch() == 'x86': + # x86 (32 bit) MSVC 2015+ defaults to /arch:SSE2 + if not PkgSkip("SSE2") or 'SSE2' in opts: # x86 with SSE2 + cmd += " /arch:SSE2" # let's still be explicit and pass in /arch:SSE2 + else: # x86 without SSE2 + cmd += " /arch:IA32" for x in ipath: cmd += " /I" + x for (opt,dir) in INCDIRECTORIES: if (opt=="ALWAYS") or (opt in opts): cmd += " /I" + BracketNameWithQuotes(dir)