Add option to gn bootstrap to specify the build directory
R=dpranke@chromium.org
Change-Id: Ie2ccfd24ebff5efc58d972c2755383b79bc3d27b
Reviewed-on: https://chromium-review.googlesource.com/780818
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Thomas Anderson <thomasanderson@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#518117}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 8b6898fe4eaa9131b35f2e9d72af0fa1fcccccf0
diff --git a/tools/gn/bootstrap/bootstrap.py b/tools/gn/bootstrap/bootstrap.py
index 7098995..c4dd5d2 100755
--- a/tools/gn/bootstrap/bootstrap.py
+++ b/tools/gn/bootstrap/bootstrap.py
@@ -63,7 +63,9 @@
def run_build(tempdir, options):
- if options.debug:
+ if options.build_path:
+ build_rel = options.build_path
+ elif options.debug:
build_rel = os.path.join('out', 'Debug')
else:
build_rel = os.path.join('out', 'Release')
@@ -109,6 +111,8 @@
help='Re-used build directory instead of using new '
'temporary location each time')
parser.add_option('--gn-gen-args', help='Args to pass to gn gen --args')
+ parser.add_option('--build-path', help='The directory in which to build gn, '
+ 'relative to the src directory. (eg. out/Release)')
parser.add_option('-v', '--verbose', action='store_true',
help='Log more details')
options, args = parser.parse_args(argv)