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
|
||||
GN_EXTRA_ARGS: 'target_cpu = "x86"'
|
||||
NPM_CONFIG_ARCH: ia32
|
||||
TARGET_ARCH: ia32
|
||||
|
||||
env-arm: &env-arm
|
||||
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True'
|
||||
|
|
|
@ -35,17 +35,10 @@ def get_platform_key():
|
|||
|
||||
|
||||
def get_target_arch():
|
||||
try:
|
||||
target_arch_path = os.path.join(__file__, '..', '..', '..', 'vendor',
|
||||
'download', 'libchromiumcontent',
|
||||
'.target_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'
|
||||
arch = os.environ.get('TARGET_ARCH')
|
||||
if arch is None:
|
||||
return 'x64'
|
||||
return arch
|
||||
|
||||
|
||||
def get_env_var(name):
|
||||
|
|
Loading…
Reference in a new issue