Wrap whole cibuild with VS build env

This commit is contained in:
Cheng Zhao 2016-05-08 10:44:18 +09:00
Родитель 047855cf31
Коммит 8cf30c5440
2 изменённых файлов: 11 добавлений и 10 удалений

Просмотреть файл

@ -5,6 +5,8 @@ import platform
import subprocess
import sys
from lib.util import get_vs_env
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
# We're in JENKINS_ROOT/workspace/libchromiumcontent. Walk up to JENKINS_ROOT.
@ -17,9 +19,6 @@ def main():
return 'Error: Can\'t find {0}'.format(S3_CREDENTIALS_FILE)
copy_to_environment(S3_CREDENTIALS_FILE)
print 'Python version:', platform.python_version()
print 'OS version:', os_version()
if sys.platform in ['win32', 'cygwin']:
return (run_ci(['-t', 'x64']) or
run_ci(['-t', 'ia32']))
@ -51,6 +50,15 @@ def os_version():
def run_ci(args):
if sys.platform in ['win32', 'cygwin']:
target_arch = args[1]
# Set build env for VS.
if target_arch == 'x64':
vs_env = get_vs_env('14.0', 'x86_amd64')
elif target_arch == 'ia32':
vs_env = get_vs_env('14.0', 'amd64_x86')
os.environ.update(vs_env)
return (run_script('bootstrap') or
run_script('update', args) or
run_script('build', args) or

Просмотреть файл

@ -10,7 +10,6 @@ import tarfile
import tempfile
import urllib2
from lib.util import get_vs_env
from lib.config import get_output_dir
@ -131,12 +130,6 @@ def gyp_env(target_arch, component, gyp_defines):
env['GYP_MSVS_VERSION'] = '2015'
# Use Windows 10 SDK.
env['WINDOWSSDKDIR'] = 'C:\\Program Files (x86)\\Windows Kits\\10'
# Set build env for VS.
if target_arch == 'x64':
vs_env = get_vs_env('14.0', 'x86_amd64')
elif target_arch == 'ia32':
vs_env = get_vs_env('14.0', 'amd64_x86')
env.update(vs_env)
elif sys.platform == 'linux2' and target_arch in ('arm', 'ia32'):
# ARM build requires cross compilation.
env['GYP_CROSSCOMPILE'] = '1'