parameters: (
      env, vc_flavor='x86')
docstring: When run on a non-Windows system, this function does nothing.
  
       When run on a Windows system, this function wipes the binary, include
       and lib paths so that any non-hermetic tools won't be used.
       These paths will be set up by target_platform_windows and other tools.
       By wiping the paths here, we make the adding the other tools
       order-independent.
    Args:
      env: The SCons environment in question.
      vc_flavor: Defaults to x86, can be 'x86', 'amd64' or 'x86_amd64'. The
          latter is using the 32-bit executable of the 64-bit compiler.
    Returns:
      Nothing.
    Raises:
      ValueError: An error if vc_flavor is not valid.
docstring_summary: When run on a non-Windows system, this function does nothing.
docstring_tokens: When run on a non - Windows system this function does nothing .
function: def _SetMsvcCompiler(
      env, vc_flavor='x86'):
    """When run on a non-Windows system, this function does nothing.
  
       When run on a Windows system, this function wipes the binary, include
       and lib paths so that any non-hermetic tools won't be used.
       These paths will be set up by target_platform_windows and other tools.
       By wiping the paths here, we make the adding the other tools
       order-independent.
    Args:
      env: The SCons environment in question.
      vc_flavor: Defaults to x86, can be 'x86', 'amd64' or 'x86_amd64'. The
          latter is using the 32-bit executable of the 64-bit compiler.
    Returns:
      Nothing.
    Raises:
      ValueError: An error if vc_flavor is not valid.
    """
    if vc_flavor not in ('x86', 'amd64', 'x86_amd64'):
      raise ValueError('vc_flavor must be one of: amd64, x86, x86_amd64.')
  
    vc_dir = os.environ.get('VSINSTALLDIR')
    platform_sdk_dir = os.environ.get('OMAHA_PLATFORM_SDK_DIR')
  
    env['GOOGLECLIENT'] = '$MAIN_DIR/..'
    env['GOOGLE3'] = '$GOOGLECLIENT'
    env['THIRD_PARTY'] = '$GOOGLECLIENT/third_party/'
  
    env.Replace(
        PLATFORM_SDK_DIR=platform_sdk_dir,
        MSVC_FLAVOR=('amd64', 'x86')[vc_flavor == 'x86'],
        VC12_0_DIR=vc_dir,
        WINDOWS_SDK_8_1_DIR=platform_sdk_dir,
    )
  
    # Clear any existing paths.
    env['ENV']['PATH'] = ''
    env['ENV']['INCLUDE'] = ''
    env['ENV']['LIB'] = ''
  
    tools_paths = []
    include_paths = []
    lib_paths = []
    vc_bin_dir = vc_dir + '/vc/bin'
    if vc_flavor == 'amd64':
      vc_bin_dir += '/amd64'
    elif vc_flavor == 'x86_amd64':
      vc_bin_dir += '/x86_amd64'
  
    tools_paths += [vc_bin_dir,]
  
    include_paths.append(vc_dir + '/vc/include')
    if vc_flavor == 'x86':
      lib_paths.append(vc_dir + '/vc/lib')
    else:
      lib_paths.append(vc_dir + '/vc/lib/amd64')
  
    # Add explicit location of platform SDK to tools path
    tools_paths.append(platform_sdk_dir + '/bin')
    include_paths += [
        platform_sdk_dir + '/include',         # Platform SDKs up to Vista (incl.)
        platform_sdk_dir + '/include/um',      # Windows SDKs
        platform_sdk_dir + '/include/shared',  # Windows SDKs
    ]
    if vc_flavor == 'x86':
      lib_paths += [
          platform_sdk_dir + '/lib',  # Platform SDKs up to Vista (incl.)
          platform_sdk_dir + '/lib/winv6.3/um/x86',  # Windows SDK 8.1
      ]
      tools_paths.append(platform_sdk_dir + '/bin/x86')  # VC 12 only
    else:
      lib_paths += [
          platform_sdk_dir + '/lib/x64',  # Platform SDKs up to Vista (incl.)
          platform_sdk_dir + '/lib/winv6.3/um/x64',  # Windows SDK 8.1
      ]
      # VC 12 needs this, otherwise mspdb120.dll will not be found.
      tools_paths.append(vc_dir + '/vc/bin')
      tools_paths.append(platform_sdk_dir + '/bin/x64')  # VC 12 only
  
    for p in tools_paths:
      env.AppendENVPath('PATH', env.Dir(p).abspath)
    for p in include_paths:
      env.AppendENVPath('INCLUDE', env.Dir(p).abspath)
    for p in lib_paths:
      env.AppendENVPath('LIB', env.Dir(p).abspath)
function_tokens: def _SetMsvcCompiler ( env , vc_flavor = 'x86' ) : if vc_flavor not in ( 'x86' , 'amd64' , 'x86_amd64' ) : raise ValueError ( 'vc_flavor must be one of: amd64, x86, x86_amd64.' ) vc_dir = os . environ . get ( 'VSINSTALLDIR' ) platform_sdk_dir = os . environ . get ( 'OMAHA_PLATFORM_SDK_DIR' ) env [ 'GOOGLECLIENT' ] = '$MAIN_DIR/..' env [ 'GOOGLE3' ] = '$GOOGLECLIENT' env [ 'THIRD_PARTY' ] = '$GOOGLECLIENT/third_party/' env . Replace ( PLATFORM_SDK_DIR = platform_sdk_dir , MSVC_FLAVOR = ( 'amd64' , 'x86' ) [ vc_flavor == 'x86' ] , VC12_0_DIR = vc_dir , WINDOWS_SDK_8_1_DIR = platform_sdk_dir , ) # Clear any existing paths. env [ 'ENV' ] [ 'PATH' ] = '' env [ 'ENV' ] [ 'INCLUDE' ] = '' env [ 'ENV' ] [ 'LIB' ] = '' tools_paths = [ ] include_paths = [ ] lib_paths = [ ] vc_bin_dir = vc_dir + '/vc/bin' if vc_flavor == 'amd64' : vc_bin_dir += '/amd64' elif vc_flavor == 'x86_amd64' : vc_bin_dir += '/x86_amd64' tools_paths += [ vc_bin_dir , ] include_paths . append ( vc_dir + '/vc/include' ) if vc_flavor == 'x86' : lib_paths . append ( vc_dir + '/vc/lib' ) else : lib_paths . append ( vc_dir + '/vc/lib/amd64' ) # Add explicit location of platform SDK to tools path tools_paths . append ( platform_sdk_dir + '/bin' ) include_paths += [ platform_sdk_dir + '/include' , # Platform SDKs up to Vista (incl.) platform_sdk_dir + '/include/um' , # Windows SDKs platform_sdk_dir + '/include/shared' , # Windows SDKs ] if vc_flavor == 'x86' : lib_paths += [ platform_sdk_dir + '/lib' , # Platform SDKs up to Vista (incl.) platform_sdk_dir + '/lib/winv6.3/um/x86' , # Windows SDK 8.1 ] tools_paths . append ( platform_sdk_dir + '/bin/x86' ) # VC 12 only else : lib_paths += [ platform_sdk_dir + '/lib/x64' , # Platform SDKs up to Vista (incl.) platform_sdk_dir + '/lib/winv6.3/um/x64' , # Windows SDK 8.1 ] # VC 12 needs this, otherwise mspdb120.dll will not be found. tools_paths . append ( vc_dir + '/vc/bin' ) tools_paths . append ( platform_sdk_dir + '/bin/x64' ) # VC 12 only for p in tools_paths : env . AppendENVPath ( 'PATH' , env . Dir ( p ) . abspath ) for p in include_paths : env . AppendENVPath ( 'INCLUDE' , env . Dir ( p ) . abspath ) for p in lib_paths : env . AppendENVPath ( 'LIB' , env . Dir ( p ) . abspath )