chore: get target arch from TARGET_ARCH env var
This commit is contained in:
parent
d6500244a4
commit
adc60a72ca
2 changed files with 5 additions and 11 deletions
|
@ -42,6 +42,7 @@ env-unittests: &env-unittests
|
||||||
env-ia32: &env-ia32
|
env-ia32: &env-ia32
|
||||||
GN_EXTRA_ARGS: 'target_cpu = "x86"'
|
GN_EXTRA_ARGS: 'target_cpu = "x86"'
|
||||||
NPM_CONFIG_ARCH: ia32
|
NPM_CONFIG_ARCH: ia32
|
||||||
|
TARGET_ARCH: ia32
|
||||||
|
|
||||||
env-arm: &env-arm
|
env-arm: &env-arm
|
||||||
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True'
|
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True'
|
||||||
|
|
|
@ -35,17 +35,10 @@ def get_platform_key():
|
||||||
|
|
||||||
|
|
||||||
def get_target_arch():
|
def get_target_arch():
|
||||||
try:
|
arch = os.environ.get('TARGET_ARCH')
|
||||||
target_arch_path = os.path.join(__file__, '..', '..', '..', 'vendor',
|
if arch is None:
|
||||||
'download', 'libchromiumcontent',
|
return 'x64'
|
||||||
'.target_arch')
|
return arch
|
||||||
with open(os.path.normpath(target_arch_path)) as f:
|
|
||||||
return f.read().strip()
|
|
||||||
except IOError as e:
|
|
||||||
if e.errno != errno.ENOENT:
|
|
||||||
raise
|
|
||||||
|
|
||||||
return 'x64'
|
|
||||||
|
|
||||||
|
|
||||||
def get_env_var(name):
|
def get_env_var(name):
|
||||||
|
|
Loading…
Add table
Reference in a new issue