Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix VS project generation with SCons 4.8.0+ #94117

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,7 @@ def detect_visual_c_compiler_version(tools_env):


def find_visual_c_batch_file(env):
# TODO: We should investigate if we can avoid relying on SCons internals here.
from SCons.Tool.MSCommon.vc import find_batch_file, find_vc_pdir, get_default_version, get_host_target

msvc_version = get_default_version(env)
Expand All @@ -661,10 +662,11 @@ def find_visual_c_batch_file(env):
if env.scons_version < (4, 6, 0):
return find_batch_file(env, msvc_version, host_platform, target_platform)[0]

# Scons 4.6.0+ removed passing env, so we need to get the product_dir ourselves first,
# SCons 4.6.0+ removed passing env, so we need to get the product_dir ourselves first,
# then pass that as the last param instead of env as the first param as before.
# We should investigate if we can avoid relying on SCons internals here.
product_dir = find_vc_pdir(env, msvc_version)
# Param names need to be explicit, as they were shuffled around in SCons 4.8.0.
product_dir = find_vc_pdir(msvc_version=msvc_version, env=env)

return find_batch_file(msvc_version, host_platform, target_platform, product_dir)[0]


Expand Down
Loading