Skip to content

Commit 851109c

Browse files
committed
[build-script.py] Provide an option to pass a custom path to the gyb tool
1 parent 946caf4 commit 851109c

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

build-script.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -507,6 +507,10 @@ def main():
507507
Path to the FileCheck executable that was built as part of the LLVM
508508
repository. If not specified, it will be looked up from PATH.
509509
''')
510+
testing_group.add_argument('--gyb-exec', default=None, help='''
511+
Path to the gyb tool. If not specified, it will be looked up relative to
512+
the SwiftSyntax directory ('../swift/utils/gyb').
513+
''')
510514
testing_group.add_argument('--verify-generated-files', action='store_true',
511515
help='''
512516
Instead of generating files using gyb, verify that the files which
@@ -515,6 +519,10 @@ def main():
515519

516520
args = parser.parse_args(sys.argv[1:])
517521

522+
global GYB_EXEC
523+
if args.gyb_exec:
524+
GYB_EXEC = args.gyb_exec
525+
518526
if args.install:
519527
if not args.dylib_dir:
520528
fatal_error('Must specify directory to install')

0 commit comments

Comments
 (0)