Commit eb4a7974 authored by brettw@chromium.org's avatar brettw@chromium.org

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: svn://svn.chromium.org/chrome/trunk/src@238493 0039d316-1c4b-4281-b951-d872f2087c98
parent 3155037f
...@@ -131,9 +131,8 @@ def RunGN(supplemental_includes): ...@@ -131,9 +131,8 @@ def RunGN(supplemental_includes):
if sys.platform == 'win32': if sys.platform == 'win32':
gnpath += 'win/gn.exe' gnpath += 'win/gn.exe'
elif sys.platform.startswith('linux'): elif sys.platform.startswith('linux'):
# On Linux we have 32-bit and 64-bit versions. Checking /sbin/init avoids # On Linux we have 32-bit and 64-bit versions.
# uname's confusion when running a 32-bit userland on a 64-bit kernel. if subprocess.check_output(["getconf", "LONG_BIT"]).find("64") >= 0:
if subprocess.check_output(["file", "/sbin/init"]).find("ELF 64-bit") >= 0:
gnpath += 'linux/gn' gnpath += 'linux/gn'
else: else:
gnpath += 'linux/gn32' gnpath += 'linux/gn32'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment