Skip to content

Commit

Permalink
SCons: Fix creating VS solution with SCons 4.4.0
Browse files Browse the repository at this point in the history
Fixes #63709.

Co-authored-by: 19PHOBOSS98 <[email protected]>
(cherry picked from commit 89847dc)
  • Loading branch information
akien-mga committed Aug 1, 2022
1 parent 60d3460 commit e0214a1
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -619,8 +619,18 @@ def detect_visual_c_compiler_version(tools_env):
def find_visual_c_batch_file(env):
from SCons.Tool.MSCommon.vc import get_default_version, get_host_target, find_batch_file

# Syntax changed in SCons 4.4.0.
from SCons import __version__ as scons_raw_version

scons_ver = env._get_major_minor_revision(scons_raw_version)

version = get_default_version(env)
(host_platform, target_platform, _) = get_host_target(env)

if scons_ver >= (4, 4, 0):
(host_platform, target_platform, _) = get_host_target(env, version)
else:
(host_platform, target_platform, _) = get_host_target(env)

return find_batch_file(env, version, host_platform, target_platform)[0]


Expand Down

0 comments on commit e0214a1

Please sign in to comment.