Skip to content

Commit 31ebb0e

Browse files
authored
Merge pull request swiftlang#72 from nkcsgexi/degyb-only
build-script: allow the build-script to degyb files only.
2 parents 2b857af + 74e3ed6 commit 31ebb0e

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
@@ -438,6 +438,11 @@ def main():
438438
help='Disable sandboxes when building with '
439439
'Swift PM')
440440

441+
build_group.add_argument('--degyb-only',
442+
action='store_true',
443+
help='The script only generates swift files from gyb '
444+
'and skips the rest of the build')
445+
441446
testing_group = parser.add_argument_group('Testing')
442447
testing_group.add_argument('-t', '--test', action='store_true',
443448
help='Run tests')
@@ -499,6 +504,9 @@ def main():
499504
try:
500505
generate_gyb_files(verbose=args.verbose,
501506
add_source_locations=args.add_source_locations)
507+
# Skip the rest of the build if we should perform degyb only
508+
if args.degyb_only:
509+
sys.exit(0)
502510
except subprocess.CalledProcessError as e:
503511
printerr('Error: Generating .gyb files failed')
504512
printerr('Executing: %s' % ' '.join(e.cmd))

0 commit comments

Comments
 (0)