Skip to content

Commit 6e6661f

Browse files
dustdfgRepiteo
andcommitted
Remove code for unsupported compilers
Follow up to: #99217 and #98842 Signed-off-by: Yevhen Babiichuk (DustDFG) <dfgdust@gmail.com> Co-authored-by: Thaddeus Crews <repiteo@outlook.com>
1 parent fd4c29a commit 6e6661f

File tree

2 files changed

+6
-29
lines changed

2 files changed

+6
-29
lines changed

SConstruct

-2
Original file line numberDiff line numberDiff line change
@@ -854,8 +854,6 @@ else: # GCC, Clang
854854

855855
if methods.using_gcc(env):
856856
common_warnings += ["-Wshadow", "-Wno-misleading-indentation"]
857-
if cc_version_major == 7: # Bogus warning fixed in 8+.
858-
common_warnings += ["-Wno-strict-overflow"]
859857
if cc_version_major < 11:
860858
# Regression in GCC 9/10, spams so much in our variadic templates
861859
# that we need to outright disable it.

platform/windows/detect.py

+6-27
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ def detect_build_env_arch():
101101
"arm64": "arm64",
102102
"aarch64": "arm64",
103103
}
104-
if os.getenv("VCINSTALLDIR") or os.getenv("VCTOOLSINSTALLDIR"):
104+
if os.getenv("VCTOOLSINSTALLDIR"):
105105
if os.getenv("Platform"):
106106
msvc_arch = os.getenv("Platform").lower()
107107
if msvc_arch in msvc_target_aliases.keys():
@@ -112,32 +112,11 @@ def detect_build_env_arch():
112112
if msvc_arch in msvc_target_aliases.keys():
113113
return msvc_target_aliases[msvc_arch]
114114

115-
# Pre VS 2017 checks.
116-
if os.getenv("VCINSTALLDIR"):
117-
PATH = os.getenv("PATH").upper()
118-
VCINSTALLDIR = os.getenv("VCINSTALLDIR").upper()
119-
path_arch = {
120-
"BIN\\x86_ARM;": "arm32",
121-
"BIN\\amd64_ARM;": "arm32",
122-
"BIN\\x86_ARM64;": "arm64",
123-
"BIN\\amd64_ARM64;": "arm64",
124-
"BIN\\x86_amd64;": "a86_64",
125-
"BIN\\amd64;": "x86_64",
126-
"BIN\\amd64_x86;": "x86_32",
127-
"BIN;": "x86_32",
128-
}
129-
for path, arch in path_arch.items():
130-
final_path = VCINSTALLDIR + path
131-
if final_path in PATH:
132-
return arch
133-
134-
# VS 2017 and newer.
135-
if os.getenv("VCTOOLSINSTALLDIR"):
136-
host_path_index = os.getenv("PATH").upper().find(os.getenv("VCTOOLSINSTALLDIR").upper() + "BIN\\HOST")
137-
if host_path_index > -1:
138-
first_path_arch = os.getenv("PATH")[host_path_index:].split(";")[0].rsplit("\\", 1)[-1].lower()
139-
if first_path_arch in msvc_target_aliases.keys():
140-
return msvc_target_aliases[first_path_arch]
115+
host_path_index = os.getenv("PATH").upper().find(os.getenv("VCTOOLSINSTALLDIR").upper() + "BIN\\HOST")
116+
if host_path_index > -1:
117+
first_path_arch = os.getenv("PATH")[host_path_index:].split(";")[0].rsplit("\\", 1)[-1].lower()
118+
if first_path_arch in msvc_target_aliases.keys():
119+
return msvc_target_aliases[first_path_arch]
141120

142121
msys_target_aliases = {
143122
"mingw32": "x86_32",

0 commit comments

Comments
 (0)