@@ -49,7 +49,7 @@ def escapeCmdArg(arg):
49
49
return arg
50
50
51
51
52
- def call (cmd , env = os .environ , stdout = None , stderr = subprocess .STDOUT ,
52
+ def call (cmd , env = os .environ , stdout = None , stderr = subprocess .STDOUT ,
53
53
verbose = False ):
54
54
if verbose :
55
55
print (' ' .join ([escapeCmdArg (arg ) for arg in cmd ]))
@@ -78,9 +78,9 @@ def realpath(path):
78
78
def check_gyb_exec ():
79
79
if not os .path .exists (GYB_EXEC ):
80
80
fatal_error ('''
81
- Error: Could not find gyb.
81
+ Error: Could not find gyb.
82
82
83
- Make sure you have the main swift repo checked out next to the swift-syntax
83
+ Make sure you have the main swift repo checked out next to the swift-syntax
84
84
repository.
85
85
Refer to README.md for more information.
86
86
''' )
@@ -110,10 +110,10 @@ def generate_gyb_files(verbose, add_source_locations):
110
110
# Clear any *.swift files that are relics from the previous run.
111
111
for previous_gyb_gen_file in os .listdir (generated_files_dir ):
112
112
if previous_gyb_gen_file .endswith ('.swift' ):
113
- gyb_file = os .path .join (swiftsyntax_sources_dir ,
113
+ gyb_file = os .path .join (swiftsyntax_sources_dir ,
114
114
previous_gyb_gen_file + '.gyb' )
115
115
if not os .path .exists (gyb_file ):
116
- check_call (['rm' , previous_gyb_gen_file ], cwd = generated_files_dir ,
116
+ check_call (['rm' , previous_gyb_gen_file ], cwd = generated_files_dir ,
117
117
verbose = verbose )
118
118
119
119
# Generate the new .swift files in a temporary directory and only copy them
@@ -140,7 +140,7 @@ def generate_gyb_files(verbose, add_source_locations):
140
140
line_directive_flags ,
141
141
verbose = verbose )
142
142
143
- # Copy the file if different from the file already present in
143
+ # Copy the file if different from the file already present in
144
144
# gyb_generated
145
145
check_call (['rsync' ] +
146
146
['--checksum' ] +
@@ -257,20 +257,20 @@ def run_tests(swift_test_exec, build_dir, parser_header_dir, parser_lib_dir,
257
257
def check_lit_exec ():
258
258
if not os .path .exists (LIT_EXEC ):
259
259
fatal_error ('''
260
- Error: Could not find lit.py.
260
+ Error: Could not find lit.py.
261
261
262
- Make sure you have the llvm repo checked out next to the swift-syntax repo.
262
+ Make sure you have the llvm repo checked out next to the swift-syntax repo.
263
263
Refer to README.md for more information.
264
264
''' )
265
265
266
266
267
267
def check_incr_transfer_roundtrip_exec ():
268
268
if not os .path .exists (INCR_TRANSFER_ROUNDTRIP_EXEC ):
269
269
fatal_error ('''
270
- Error: Could not find incr_transfer_round_trip.py.
270
+ Error: Could not find incr_transfer_round_trip.py.
271
271
272
- Make sure you have the main swift repo checked out next to the swift-syntax
273
- repo.
272
+ Make sure you have the main swift repo checked out next to the swift-syntax
273
+ repo.
274
274
Refer to README.md for more information.
275
275
''' )
276
276
@@ -305,7 +305,7 @@ def run_lit_tests(swift_build_exec, build_dir, parser_header_dir, parser_lib_dir
305
305
306
306
lit_call = [LIT_EXEC ]
307
307
lit_call .extend ([PACKAGE_DIR + '/lit_tests' ])
308
-
308
+
309
309
if swiftc_exec :
310
310
lit_call .extend (['--param' , 'SWIFTC=' + realpath (swiftc_exec )])
311
311
if filecheck_exec :
@@ -444,8 +444,8 @@ def main():
444
444
basic_group .add_argument ('--swiftmodule-base-name' ,
445
445
help = '''
446
446
The name under which the Swift module should be installed. A .swiftdoc and
447
- .swiftmodule file extension will be added to this path and the
448
- corresponding files will be copied there.
447
+ .swiftmodule file extension will be added to this path and the
448
+ corresponding files will be copied there.
449
449
Example /path/to/SwiftSyntax.swiftmodule/x86_64 copies files to
450
450
/path/to/SwiftSyntax.swiftmodule/x86_64.swiftmodule and
451
451
/path/to/SwiftSyntax.swiftmodule/x86_64.swiftdoc
@@ -465,7 +465,7 @@ def main():
465
465
testing_group = parser .add_argument_group ('Testing' )
466
466
testing_group .add_argument ('-t' , '--test' , action = 'store_true' ,
467
467
help = 'Run tests' )
468
-
468
+
469
469
testing_group .add_argument ('--swift-build-exec' , default = 'swift build' ,
470
470
help = '''
471
471
Path to the swift-build executable that is used to build SwiftPM projects
0 commit comments