makepanda: MSVC fix generating non-SSE2 code for x86

Closes #1018
Fixes #1017
This commit is contained in:
kamgha 2020-09-13 12:04:06 +02:00 committed by rdb
parent 2e862c1bbe
commit 30d8c90f77

View File

@ -1313,8 +1313,12 @@ def CompileCxx(obj,src,opts):
cmd += "/Zc:threadSafeInit- " cmd += "/Zc:threadSafeInit- "
cmd += "/Fo" + obj + " /nologo /c" cmd += "/Fo" + obj + " /nologo /c"
if GetTargetArch() != 'x64' and (not PkgSkip("SSE2") or 'SSE2' in opts): if GetTargetArch() == 'x86':
cmd += " /arch:SSE2" # 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 x in ipath: cmd += " /I" + x
for (opt,dir) in INCDIRECTORIES: for (opt,dir) in INCDIRECTORIES:
if (opt=="ALWAYS") or (opt in opts): cmd += " /I" + BracketNameWithQuotes(dir) if (opt=="ALWAYS") or (opt in opts): cmd += " /I" + BracketNameWithQuotes(dir)