Skip to content

Commit

Permalink
Remove code for unsupported compilers
Browse files Browse the repository at this point in the history
Follow up to: godotengine#99217 and godotengine#98842

Signed-off-by: Yevhen Babiichuk (DustDFG) <dfgdust@gmail.com>
Co-authored-by: Thaddeus Crews <repiteo@outlook.com>
  • Loading branch information
dustdfg and Repiteo committed Nov 19, 2024
1 parent fd4c29a commit 6e6661f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 29 deletions.
2 changes: 0 additions & 2 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -854,8 +854,6 @@ else: # GCC, Clang

if methods.using_gcc(env):
common_warnings += ["-Wshadow", "-Wno-misleading-indentation"]
if cc_version_major == 7: # Bogus warning fixed in 8+.
common_warnings += ["-Wno-strict-overflow"]
if cc_version_major < 11:
# Regression in GCC 9/10, spams so much in our variadic templates
# that we need to outright disable it.
Expand Down
33 changes: 6 additions & 27 deletions platform/windows/detect.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def detect_build_env_arch():
"arm64": "arm64",
"aarch64": "arm64",
}
if os.getenv("VCINSTALLDIR") or os.getenv("VCTOOLSINSTALLDIR"):
if os.getenv("VCTOOLSINSTALLDIR"):
if os.getenv("Platform"):
msvc_arch = os.getenv("Platform").lower()
if msvc_arch in msvc_target_aliases.keys():
Expand All @@ -112,32 +112,11 @@ def detect_build_env_arch():
if msvc_arch in msvc_target_aliases.keys():
return msvc_target_aliases[msvc_arch]

# Pre VS 2017 checks.
if os.getenv("VCINSTALLDIR"):
PATH = os.getenv("PATH").upper()
VCINSTALLDIR = os.getenv("VCINSTALLDIR").upper()
path_arch = {
"BIN\\x86_ARM;": "arm32",
"BIN\\amd64_ARM;": "arm32",
"BIN\\x86_ARM64;": "arm64",
"BIN\\amd64_ARM64;": "arm64",
"BIN\\x86_amd64;": "a86_64",
"BIN\\amd64;": "x86_64",
"BIN\\amd64_x86;": "x86_32",
"BIN;": "x86_32",
}
for path, arch in path_arch.items():
final_path = VCINSTALLDIR + path
if final_path in PATH:
return arch

# VS 2017 and newer.
if os.getenv("VCTOOLSINSTALLDIR"):
host_path_index = os.getenv("PATH").upper().find(os.getenv("VCTOOLSINSTALLDIR").upper() + "BIN\\HOST")
if host_path_index > -1:
first_path_arch = os.getenv("PATH")[host_path_index:].split(";")[0].rsplit("\\", 1)[-1].lower()
if first_path_arch in msvc_target_aliases.keys():
return msvc_target_aliases[first_path_arch]
host_path_index = os.getenv("PATH").upper().find(os.getenv("VCTOOLSINSTALLDIR").upper() + "BIN\\HOST")
if host_path_index > -1:
first_path_arch = os.getenv("PATH")[host_path_index:].split(";")[0].rsplit("\\", 1)[-1].lower()
if first_path_arch in msvc_target_aliases.keys():
return msvc_target_aliases[first_path_arch]

msys_target_aliases = {
"mingw32": "x86_32",
Expand Down

0 comments on commit 6e6661f

Please sign in to comment.