@@ -648,6 +648,7 @@ def detect_visual_c_compiler_version(tools_env):
648648
649649
650650def find_visual_c_batch_file (env ):
651+ # TODO: We should investigate if we can avoid relying on SCons internals here.
651652 from SCons .Tool .MSCommon .vc import find_batch_file , find_vc_pdir , get_default_version , get_host_target
652653
653654 msvc_version = get_default_version (env )
@@ -661,10 +662,11 @@ def find_visual_c_batch_file(env):
661662 if env .scons_version < (4 , 6 , 0 ):
662663 return find_batch_file (env , msvc_version , host_platform , target_platform )[0 ]
663664
664- # Scons 4.6.0+ removed passing env, so we need to get the product_dir ourselves first,
665+ # SCons 4.6.0+ removed passing env, so we need to get the product_dir ourselves first,
665666 # then pass that as the last param instead of env as the first param as before.
666- # We should investigate if we can avoid relying on SCons internals here.
667- product_dir = find_vc_pdir (env , msvc_version )
667+ # Param names need to be explicit, as they were shuffled around in SCons 4.8.0.
668+ product_dir = find_vc_pdir (msvc_version = msvc_version , env = env )
669+
668670 return find_batch_file (msvc_version , host_platform , target_platform , product_dir )[0 ]
669671
670672
0 commit comments