[llvm] r355645 - [GN] Locate prebuilt binaries correctly.
Mitch Phillips via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 7 14:20:36 PST 2019
Author: hctim
Date: Thu Mar 7 14:20:36 2019
New Revision: 355645
URL: http://llvm.org/viewvc/llvm-project?rev=355645&view=rev
Log:
[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.
Modified:
llvm/trunk/utils/gn/gn.py
Modified: llvm/trunk/utils/gn/gn.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/gn/gn.py?rev=355645&r1=355644&r2=355645&view=diff
==============================================================================
--- llvm/trunk/utils/gn/gn.py (original)
+++ llvm/trunk/utils/gn/gn.py Thu Mar 7 14:20:36 2019
@@ -38,7 +38,8 @@ def main():
# Find real gn executable.
gn = 'gn'
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
# if it's there, or suggest to run get.py if it isn't.
platform = get_platform()
More information about the llvm-commits
mailing list