summaryrefslogtreecommitdiffstats
path: root/platform/windows/detect.py
diff options
context:
space:
mode:
Diffstat (limited to 'platform/windows/detect.py')
-rw-r--r--platform/windows/detect.py21
1 files changed, 13 insertions, 8 deletions
diff --git a/platform/windows/detect.py b/platform/windows/detect.py
index fee306a25c..11dd4548f1 100644
--- a/platform/windows/detect.py
+++ b/platform/windows/detect.py
@@ -214,11 +214,6 @@ def get_opts():
os.path.join(d3d12_deps_folder, "mesa"),
),
(
- "dxc_path",
- "Path to the DirectX Shader Compiler distribution (required for D3D12)",
- os.path.join(d3d12_deps_folder, "dxc"),
- ),
- (
"agility_sdk_path",
"Path to the Agility SDK distribution (optional for D3D12)",
os.path.join(d3d12_deps_folder, "agility_sdk"),
@@ -252,7 +247,7 @@ def get_flags():
return {
"arch": arch,
- "supported": ["mono"],
+ "supported": ["d3d12", "mono", "xaudio2"],
}
@@ -306,7 +301,6 @@ def setup_msvc_manual(env: "SConsEnvironment"):
print("Using VCVARS-determined MSVC, arch %s" % (env_arch))
-# FIXME: Likely overwrites command-line options for the msvc compiler. See #91883.
def setup_msvc_auto(env: "SConsEnvironment"):
"""Set up MSVC using SCons's auto-detection logic"""
@@ -339,6 +333,12 @@ def setup_msvc_auto(env: "SConsEnvironment"):
env.Tool("msvc")
env.Tool("mssdk") # we want the MS SDK
+ # Re-add potentially overwritten flags.
+ env.AppendUnique(CCFLAGS=env.get("ccflags", "").split())
+ env.AppendUnique(CXXFLAGS=env.get("cxxflags", "").split())
+ env.AppendUnique(CFLAGS=env.get("cflags", "").split())
+ env.AppendUnique(RCFLAGS=env.get("rcflags", "").split())
+
# Note: actual compiler version can be found in env['MSVC_VERSION'], e.g. "14.1" for VS2015
print("Using SCons-detected MSVC version %s, arch %s" % (env["MSVC_VERSION"], env["arch"]))
@@ -467,6 +467,8 @@ def configure_msvc(env: "SConsEnvironment", vcvars_msvc_config):
if env["arch"] == "x86_32":
env["x86_libtheora_opt_vc"] = True
+ env.Append(CCFLAGS=["/fp:strict"])
+
env.AppendUnique(CCFLAGS=["/Gd", "/GR", "/nologo"])
env.AppendUnique(CCFLAGS=["/utf-8"]) # Force to use Unicode encoding.
env.AppendUnique(CXXFLAGS=["/TP"]) # assume all sources are C++
@@ -644,7 +646,8 @@ def configure_mingw(env: "SConsEnvironment"):
# TODO: Re-evaluate the need for this / streamline with common config.
if env["target"] == "template_release":
- env.Append(CCFLAGS=["-msse2"])
+ if env["arch"] != "arm64":
+ env.Append(CCFLAGS=["-msse2"])
elif env.dev_build:
# Allow big objects. It's supposed not to have drawbacks but seems to break
# GCC LTO, so enabling for debug builds only (which are not built with LTO
@@ -674,6 +677,8 @@ def configure_mingw(env: "SConsEnvironment"):
if env["arch"] in ["x86_32", "x86_64"]:
env["x86_libtheora_opt_gcc"] = True
+ env.Append(CCFLAGS=["-ffp-contract=off"])
+
mingw_bin_prefix = get_mingw_bin_prefix(env["mingw_prefix"], env["arch"])
if env["use_llvm"]: