mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +08:00
[Jenkins] vs_version argument not needed in get_vs_env.
This commit is contained in:
committed by
Mat Sutcliffe
parent
08578e202a
commit
1a30e24652
@@ -262,9 +262,9 @@ class MSVCBuilder(Builder):
|
|||||||
os.environ['PATH'] += os.pathsep + self._get_externals_path() #TODO still needed? we copy externals anyway
|
os.environ['PATH'] += os.pathsep + self._get_externals_path() #TODO still needed? we copy externals anyway
|
||||||
os.environ['PATH'] += os.pathsep + 'C:/Program Files/7-Zip'
|
os.environ['PATH'] += os.pathsep + 'C:/Program Files/7-Zip'
|
||||||
if self.word_size == '32':
|
if self.word_size == '32':
|
||||||
vs_env = get_vs_env('VS2017', 'x86')
|
vs_env = get_vs_env('x86')
|
||||||
else:
|
else:
|
||||||
vs_env = get_vs_env('VS2017', 'amd64')
|
vs_env = get_vs_env('amd64')
|
||||||
|
|
||||||
os.environ.update(vs_env)
|
os.environ.update(vs_env)
|
||||||
|
|
||||||
|
|||||||
@@ -60,20 +60,12 @@ def get_environment_from_batch_command(env_cmd, initial=None):
|
|||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
def get_vs_env(vs_version, arch):
|
def get_vs_env(arch):
|
||||||
"""
|
"""
|
||||||
Returns the env object for VS building environment.
|
Returns the env object for VS building environment.
|
||||||
|
|
||||||
The vs_version can be one of the following strings:
|
The arch has to be one of "x86", "amd64", "arm", "x86_amd64", "x86_arm", "amd64_x86",
|
||||||
- VS2015,
|
"amd64_arm", i.e. the args passed to vcvarsall.bat.
|
||||||
- VS2017,
|
|
||||||
the arch has to be one of "x86", "amd64", "arm", "x86_amd64", "x86_arm", "amd64_x86",
|
|
||||||
"amd64_arm", e.g. the args passed to vcvarsall.bat.
|
|
||||||
"""
|
"""
|
||||||
if vs_version == 'VS2015':
|
vsvarsall = "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\Auxiliary\\Build\\vcvarsall.bat"
|
||||||
vsvarsall = "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat"
|
|
||||||
elif vs_version == 'VS2017':
|
|
||||||
vsvarsall = "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community\\VC\Auxiliary\\Build\\vcvarsall.bat"
|
|
||||||
else:
|
|
||||||
raise RuntimeError('Unsupported Visual Studio version!')
|
|
||||||
return get_environment_from_batch_command([vsvarsall, arch])
|
return get_environment_from_batch_command([vsvarsall, arch])
|
||||||
|
|||||||
Reference in New Issue
Block a user