@@ -114,6 +114,7 @@ class Builder(object):
114
114
cmake_args += ['-DSWIFT_BUILD_REMOTE_MIRROR=FALSE' , '-DSWIFT_BUILD_DYNAMIC_STDLIB=FALSE' ,
115
115
'-DSWIFT_BUILD_STATIC_STDLIB=FALSE' , '-DSWIFT_BUILD_DYNAMIC_SDK_OVERLAY=FALSE' ,
116
116
'-DSWIFT_BUILD_STATIC_SDK_OVERLAY=FALSE' ]
117
+ cmake_args += ['-DLLVM_INCLUDE_TESTS=FALSE' , '-DCLANG_INCLUDE_TESTS=FALSE' ]
117
118
cmake_args += [os .path .join (SWIFT_SOURCE_ROOT , 'llvm' )]
118
119
self .call (cmake_args )
119
120
@@ -185,6 +186,11 @@ def main():
185
186
store_int = optbuilder .actions .store_int
186
187
store_path = optbuilder .actions .store_path
187
188
189
+ default_profile_input = os .path .join (SWIFT_SOURCE_ROOT , "swift" , "utils" , "parser-lib" , "profile-input.swift" )
190
+ default_jobs = multiprocessing .cpu_count ()
191
+ default_build_dir = os .path .join (SWIFT_BUILD_ROOT , 'parser-lib' )
192
+ default_install_prefix = defaults .DARWIN_INSTALL_PREFIX if isMac else UNIX_INSTALL_PREFIX
193
+
188
194
option ('--release' , store_true ,
189
195
help = 'build in release mode' )
190
196
option ('--lto' , store ('lto_type' ),
@@ -202,28 +208,27 @@ def main():
202
208
'Options: frontend, ir. If no optional arg is provided, ir is '
203
209
'chosen by default' )
204
210
option ('--profile-input' , store_path ,
205
- default = os . path . join ( SWIFT_SOURCE_ROOT , "swift" , "utils" , "parser-lib" , "profile-input.swift" ) ,
206
- help = 'the source file to use for PGO profiling input' )
211
+ default = default_profile_input ,
212
+ help = 'the source file to use for PGO profiling input (default = %s)' % default_profile_input )
207
213
option ('--no-assertions' , store_true ,
208
214
help = 'disable assertions' )
209
215
option (['-v' , '--verbose' ], store_true ,
210
216
help = 'print the commands executed during the build' )
211
217
option ('--dry-run' , store_true ,
212
218
help = 'print the commands to execute but not actually execute them' )
213
219
option (['-j' , '--jobs' ], store_int ('build_jobs' ),
214
- default = multiprocessing . cpu_count () ,
215
- help = 'the number of parallel build jobs to use' )
220
+ default = default_jobs ,
221
+ help = 'the number of parallel build jobs to use (default = %s)' % default_jobs )
216
222
option ('--build-dir' , store_path ,
217
- default = os .path .join (SWIFT_BUILD_ROOT , 'parser-lib' ),
218
- help = 'the path where the build products will be placed. '
219
- 'If none is specified it will use <workspace>/build/parser-lib' )
223
+ default = default_build_dir ,
224
+ help = 'the path where the build products will be placed. (default = %s)' % default_build_dir )
220
225
option ('--install-symroot' , store_path ,
221
226
help = 'the path to install debug symbols into' )
222
227
option ('--install-destdir' , store_path ,
223
228
help = 'the path to use as the filesystem root for the installation' )
224
229
option ('--install-prefix' , store ,
225
- default = defaults . DARWIN_INSTALL_PREFIX if isMac else UNIX_INSTALL_PREFIX ,
226
- help = 'the install prefix to use' )
230
+ default = default_install_prefix ,
231
+ help = 'the install prefix to use (default = %s)' % default_install_prefix )
227
232
option ('--version' , store ,
228
233
help = 'version string to use for the parser library' )
229
234
0 commit comments