1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-21 03:53:04 +02:00

[GN] Locate prebuilt binaries correctly.

Use the system shell to see if we can find a 'gn' binary on $PATH. This solves the error wherein subprocess.call fails ungracefully if the binary doesn't exist.

llvm-svn: 355645
This commit is contained in:
Mitch Phillips 2019-03-07 22:20:36 +00:00
parent 55192374db
commit 24e311da5d

View File

@ -38,7 +38,8 @@ def main():
# Find real gn executable. # Find real gn executable.
gn = 'gn' gn = 'gn'
if subprocess.call([gn, '--version'], stdout=open(os.devnull, 'w'), if subprocess.call([gn, '--version'], stdout=open(os.devnull, 'w'),
stderr=subprocess.STDOUT) != 0: stderr=subprocess.STDOUT,
shell=True) != 0:
# Not on path. See if get.py downloaded a prebuilt binary and run that # Not on path. See if get.py downloaded a prebuilt binary and run that
# if it's there, or suggest to run get.py if it isn't. # if it's there, or suggest to run get.py if it isn't.
platform = get_platform() platform = get_platform()