@@ -815,6 +815,9 @@ def main():
815815 help = "Extra actions to perform. Can be any number of "
816816 "the following: [clean, all, test, install]" ,
817817 nargs = "*" , default = ["all" ])
818+ parser .add_argument ("--show-bin-path" , action = 'store_true' ,
819+ help = "output the path to which the swiftpm binaries "
820+ "are built" )
818821 parser .add_argument ("--swiftc" , dest = "swiftc_path" ,
819822 help = "path to the swift compiler [%(default)s]" ,
820823 metavar = "PATH" )
@@ -915,6 +918,13 @@ def main():
915918 sandbox_path = os .path .join (build_path , ".bootstrap" )
916919 target_path = os .path .join (build_path , build_target )
917920
921+ libdir = os .path .join (target_path , "lib" )
922+ bindir = os .path .join (target_path , conf )
923+
924+ if args .show_bin_path :
925+ print (bindir )
926+ sys .exit (0 )
927+
918928 # Confirm rsync is available.
919929 try :
920930 subprocess .check_output (['rsync' , '--version' ], stderr = subprocess .STDOUT )
@@ -963,9 +973,6 @@ def main():
963973 processed_runtimes [version ] = process_runtime_libraries (
964974 build , args , lib_path )
965975
966-
967- libdir = os .path .join (target_path , "lib" )
968- bindir = os .path .join (target_path , conf )
969976 mkdir_p (bindir )
970977 bootstrapped_product = os .path .join (bindir , "swift-build-stage1" )
971978
0 commit comments