@@ -87,7 +87,7 @@ def check_gyb_exec():
8787
8888
8989def check_rsync ():
90- with open (os .devnull , 'w' ) as DEVNULL :
90+ with open (os .devnull , 'w' ) as DEVNULL :
9191 if call (['rsync' , '--version' ], stdout = DEVNULL ) != 0 :
9292 fatal_error ('Error: Could not find rsync.' )
9393
@@ -155,11 +155,8 @@ def generate_gyb_files(verbose, add_source_locations, destination=None):
155155
156156## Building swiftSyntax
157157
158- def get_installed_name ():
159- return 'SwiftSyntax'
160-
161158def get_installed_dylib_name ():
162- return 'lib' + get_installed_name () + ' .dylib'
159+ return 'libSwiftSyntax .dylib'
163160
164161def get_swiftpm_invocation (toolchain , action , build_dir , release ):
165162 swift_exec = os .path .join (toolchain , 'usr' , 'bin' , 'swift' )
@@ -171,11 +168,6 @@ def get_swiftpm_invocation(toolchain, action, build_dir, release):
171168 if build_dir :
172169 swiftpm_call .extend (['--build-path' , build_dir ])
173170
174- # Swift compiler needs to know the module link name.
175- swiftpm_call .extend (['-Xswiftc' , '-module-link-name' , '-Xswiftc' , get_installed_name ()])
176-
177- # To speed up compilation.
178- swiftpm_call .extend (['-Xswiftc' , '-enforce-exclusivity=unchecked' ])
179171 return swiftpm_call
180172
181173class Builder (object ):
@@ -190,20 +182,15 @@ def __init__(self, toolchain, build_dir, release, verbose,
190182 if verbose :
191183 self .swiftpm_call .extend (['--verbose' ])
192184 self .verbose = verbose
193- self ._environ = dict (os .environ )
194- self ._environ ['SWIFT_SYNTAX_BUILD_SCRIPT' ] = ''
195185
196186 def build (self , product_name , module_group_path = '' ):
197187 print ('** Building ' + product_name + ' **' )
198188 command = list (self .swiftpm_call )
199189 command .extend (['--product' , product_name ])
200190
201- # To build the group information into the module documentation file
202- if module_group_path :
203- command .extend (['-Xswiftc' , '-Xfrontend' , '-Xswiftc' , '-group-info-path' ])
204- command .extend (['-Xswiftc' , '-Xfrontend' , '-Xswiftc' , module_group_path ])
205-
206- check_call (command , env = self ._environ , verbose = self .verbose )
191+ env = dict (os .environ )
192+ env ['SWIFT_SYNTAX_CI_ENVIRONMENT' ] = '1'
193+ check_call (command , env = env , verbose = self .verbose )
207194
208195
209196## Testing
@@ -321,7 +308,9 @@ def run_xctests(toolchain, build_dir, release, verbose):
321308 if verbose :
322309 swiftpm_call .extend (['--verbose' ])
323310
324- return call (swiftpm_call , verbose = verbose ) == 0
311+ env = dict (os .environ )
312+ env ['SWIFT_SYNTAX_CI_ENVIRONMENT' ] = '1'
313+ return call (swiftpm_call , env = env , verbose = verbose ) == 0
325314
326315def delete_rpath (rpath , binary ):
327316 if platform .system () == 'Darwin' :
@@ -508,8 +497,6 @@ def main():
508497 release = args .release ,
509498 verbose = args .verbose ,
510499 disable_sandbox = args .disable_sandbox )
511- # TODO: Building with group info does not allow us to reuse the build
512- # for running the tests.
513500 builder .build ('SwiftSyntax' , module_group_path = GROUP_INFO_PATH )
514501
515502 # Only build lit-test-helper if we are planning to run tests
0 commit comments