diff options
author | Refael Ackermann <refack@gmail.com> | 2017-04-25 17:36:50 -0400 |
---|---|---|
committer | Refael Ackermann <refack@gmail.com> | 2017-05-16 15:26:14 -0400 |
commit | 4aff0563aa75f64adc6f6d4ef0965b3a14617d2b (patch) | |
tree | cf605b394f682c3394e121b03f92e537d6354dcf /tools | |
parent | 11918c4aedd27c0ed6b5f029fb2a50c889530db5 (diff) | |
download | node-new-4aff0563aa75f64adc6f6d4ef0965b3a14617d2b.tar.gz |
build: reduce one level of spawning in node_gyp
`configure` will now call `node_gyp` as a module instead of forking
makes it easier to debug
PR-URL: https://github.com/nodejs/node/pull/12653
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com>
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/gyp_node.py | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/tools/gyp_node.py b/tools/gyp_node.py index 8de046aae2..b37cc7c5f0 100755 --- a/tools/gyp_node.py +++ b/tools/gyp_node.py @@ -13,14 +13,6 @@ import gyp output_dir = os.path.join(os.path.abspath(node_root), 'out') def run_gyp(args): - rc = gyp.main(args) - if rc != 0: - print 'Error running GYP' - sys.exit(rc) - -if __name__ == '__main__': - args = sys.argv[1:] - # GYP bug. # On msvs it will crash if it gets an absolute path. # On Mac/make it will crash if it doesn't get an absolute path. @@ -63,5 +55,11 @@ if __name__ == '__main__': args.append('-Dlinux_use_bundled_gold=0') args.append('-Dlinux_use_gold_flags=0') - gyp_args = list(args) - run_gyp(gyp_args) + rc = gyp.main(args) + if rc != 0: + print 'Error running GYP' + sys.exit(rc) + + +if __name__ == '__main__': + run_gyp(sys.argv[1:]) |