Fix building HTML5 when cmd.exe is set up for MSVC

This commit is contained in:
L. Krause 2017-07-18 01:12:59 +02:00
parent f36cd77feb
commit b0e387a012

View file

@ -62,7 +62,7 @@ platform_arg = ARGUMENTS.get("platform", ARGUMENTS.get("p", False))
if (os.name == "posix"):
pass
elif (os.name == "nt"):
if (os.getenv("VCINSTALLDIR") == None or platform_arg == "android"):
if (os.getenv("VCINSTALLDIR") == None or platform_arg == "android" or platform_arg == "javascript"):
custom_tools = ['mingw']
env_base = Environment(tools=custom_tools)
@ -288,7 +288,7 @@ if selected_platform in platform_list:
if (env["warnings"] == 'yes'):
print("WARNING: warnings=yes is deprecated; assuming warnings=all")
if (os.name == "nt" and os.getenv("VSINSTALLDIR")): # MSVC, needs to stand out of course
if (os.name == "nt" and os.getenv("VSINSTALLDIR") and (platform_arg == "windows" or platform_arg == "uwp")): # MSVC, needs to stand out of course
disable_nonessential_warnings = ['/wd4267', '/wd4244', '/wd4305', '/wd4800'] # Truncations, narrowing conversions...
if (env["warnings"] == 'extra'):
env.Append(CCFLAGS=['/Wall']) # Implies /W4