Check getconf to get the bittedness of the local system.
This checks the bittedness of the local system using getconf instead of "file /sbin/init". "file" isn't on some ChromeOS roots. BUG= R=thakis@chromium.org TBR=thakis Review URL: https://codereview.chromium.org/100053008 git-svn-id: http://src.chromium.org/svn/trunk/src/build@238493 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This commit is contained in:
Родитель
e45bc881d5
Коммит
2709ce9769
|
@ -131,9 +131,8 @@ def RunGN(supplemental_includes):
|
|||
if sys.platform == 'win32':
|
||||
gnpath += 'win/gn.exe'
|
||||
elif sys.platform.startswith('linux'):
|
||||
# On Linux we have 32-bit and 64-bit versions. Checking /sbin/init avoids
|
||||
# uname's confusion when running a 32-bit userland on a 64-bit kernel.
|
||||
if subprocess.check_output(["file", "/sbin/init"]).find("ELF 64-bit") >= 0:
|
||||
# On Linux we have 32-bit and 64-bit versions.
|
||||
if subprocess.check_output(["getconf", "LONG_BIT"]).find("64") >= 0:
|
||||
gnpath += 'linux/gn'
|
||||
else:
|
||||
gnpath += 'linux/gn32'
|
||||
|
|
Загрузка…
Ссылка в новой задаче