@@ -262,20 +262,6 @@ class Target(object):
262
262
if dep_target .is_c :
263
263
import_paths .append (os .path .join (dep_target .module_root_dir , "include" ))
264
264
265
- if args .foundation_path :
266
- import_paths .append (args .foundation_path )
267
- other_args .extend (["-Xcc" , "-F" + args .foundation_path ])
268
- import_paths .append (os .path .join (args .foundation_path , "swift" ))
269
- if args .libdispatch_build_dir :
270
- import_paths .append (os .path .join (args .libdispatch_build_dir , 'lib' ))
271
- import_paths .append (os .path .join (args .libdispatch_build_dir , "src" ))
272
- import_paths .append (os .path .join (args .libdispatch_build_dir , "src" , "swift" ))
273
- import_paths .append (os .path .join (args .libdispatch_build_dir , "src" , "swift" , "swift" ))
274
- if args .libdispatch_source_dir :
275
- import_paths .append (args .libdispatch_source_dir )
276
- if args .xctest_path :
277
- import_paths .append (args .xctest_path )
278
-
279
265
# Add llbuild import paths.
280
266
llbuild_import_paths_value = llbuild_import_paths (args )
281
267
if llbuild_import_paths_value :
@@ -583,17 +569,6 @@ class llbuild(object):
583
569
if platform .system () == 'Linux' :
584
570
link_command .extend (
585
571
["-Xlinker" , "-rpath=$ORIGIN/../lib/swift/linux" ])
586
- if self .args .foundation_path :
587
- link_command .extend ([
588
- "-L" , self .args .foundation_path ,
589
- "-L" , os .path .join (self .args .foundation_path , "Foundation" )
590
- ])
591
- if self .args .libdispatch_build_dir :
592
- link_command .extend (['-L' , self .args .libdispatch_build_dir ,
593
- '-L' , os .path .join (self .args .libdispatch_build_dir , 'lib' ),
594
- '-Xlinker' , '-lBlocksRuntime' ])
595
- link_command .extend (['-L' , os .path .join (self .args .libdispatch_build_dir , "src" ),
596
- '-L' , os .path .join (self .args .libdispatch_build_dir , 'lib' )])
597
572
598
573
# Add llbuild link flags.
599
574
link_command .extend (llbuild_link_args (self .args ))
@@ -959,9 +934,6 @@ def main():
959
934
help = "Extra actions to perform. Can be any number of "
960
935
"the following: [clean, all, test, install]" ,
961
936
nargs = "*" , default = ["all" ])
962
- parser .add_argument ("--show-bin-path" , action = 'store_true' ,
963
- help = "output the path to which the swiftpm binaries "
964
- "are built" )
965
937
parser .add_argument ("--swiftc" , dest = "swiftc_path" ,
966
938
help = "path to the swift compiler [%(default)s]" ,
967
939
metavar = "PATH" )
@@ -981,14 +953,6 @@ def main():
981
953
default = ["/usr/local" ], metavar = "PATHS" )
982
954
parser .add_argument ("-v" , "--verbose" , action = "store_true" ,
983
955
help = "use verbose output" )
984
- parser .add_argument ("--foundation" , dest = "foundation_path" ,
985
- help = "Path to Foundation build directory" )
986
- parser .add_argument ("--xctest" , dest = "xctest_path" ,
987
- help = "Path to XCTest build directory" )
988
- parser .add_argument ("--libdispatch-build-dir" , dest = "libdispatch_build_dir" ,
989
- help = "Path to the libdispatch build directory" )
990
- parser .add_argument ("--libdispatch-source-dir" , dest = "libdispatch_source_dir" ,
991
- help = "Path to the libdispatch source directory" )
992
956
parser .add_argument ("--link-llbuild" , dest = "link_llbuild" ,
993
957
action = "store_true" , help = "link llbuild" , default = True )
994
958
parser .add_argument ("--llbuild-link-framework" , dest = "llbuild_link_framework" ,
@@ -1040,10 +1004,6 @@ def main():
1040
1004
args .swiftc_path = os .path .abspath (args .swiftc_path )
1041
1005
if args .sbt_path :
1042
1006
args .sbt_path = os .path .abspath (args .sbt_path )
1043
- if args .foundation_path :
1044
- args .foundation_path = os .path .abspath (args .foundation_path )
1045
- if args .xctest_path :
1046
- args .xctest_path = os .path .abspath (args .xctest_path )
1047
1007
if args .llbuild_source_dir :
1048
1008
args .llbuild_source_dir = os .path .abspath (args .llbuild_source_dir )
1049
1009
@@ -1091,10 +1051,6 @@ def main():
1091
1051
libdir = os .path .join (target_path , "lib" )
1092
1052
bindir = os .path .join (target_path , conf )
1093
1053
1094
- if args .show_bin_path :
1095
- print (bindir )
1096
- sys .exit (0 )
1097
-
1098
1054
# If the action is "clean", just remove the bootstrap and build directories.
1099
1055
if "clean" in build_actions :
1100
1056
cmd = ["rm" , "-rf" , sandbox_path ]
@@ -1181,7 +1137,6 @@ def main():
1181
1137
symlink_force (args .swiftc_path , os .path .join (bindir , "swift" ))
1182
1138
symlink_force (args .swiftc_path , os .path .join (bindir , "swiftc" ))
1183
1139
symlink_force (args .clang_path , os .path .join (bindir , "clang" ))
1184
- symlink_force (args .sbt_path , os .path .join (bindir , "swift-build-tool" ))
1185
1140
symlink_force (os .path .join (sandbox_path , "bin" , "swift-build" ),
1186
1141
bootstrapped_product )
1187
1142
if os .path .isdir (libdir ) and not os .path .islink (libdir ):
@@ -1194,62 +1149,7 @@ def main():
1194
1149
mkdir_p (usrdir )
1195
1150
symlink_force (os .path .join (sandbox_path , "lib" ), usrdir )
1196
1151
1197
- if args .foundation_path and args .libdispatch_build_dir and args .xctest_path :
1198
- libswiftdir = os .path .join (sandbox_path , "lib" , "swift" , "linux" )
1199
- libincludedir = os .path .join (libswiftdir , "x86_64" )
1200
- mkdir_p (libswiftdir )
1201
- mkdir_p (libincludedir )
1202
-
1203
- for module in ["Foundation" , "FoundationNetworking" , "FoundationXML" ]:
1204
- # Add the library.
1205
- for subdir in ['Foundation' , '' ]:
1206
- path = os .path .join (args .foundation_path , subdir , 'lib{}.so' .format (module ))
1207
- if os .path .exists (path ):
1208
- symlink_force (path , libswiftdir )
1209
- break
1210
-
1211
- # Add Foundation's swiftmodule.
1212
- for extension in [".swiftmodule" , ".swiftdoc" ]:
1213
- symlink_force (os .path .join (args .foundation_path , 'swift' , module + extension ), libincludedir )
1214
-
1215
- # Add CoreFoundation "framework". This just contains the header and the modulemap.
1216
- core_foundation_path = os .path .join (args .foundation_path , "CoreFoundation.framework" )
1217
- symlink_force (core_foundation_path , libincludedir )
1218
- cf_url_session_path = os .path .join (args .foundation_path , "CFURLSessionInterface.framework" )
1219
- symlink_force (cf_url_session_path , libincludedir )
1220
- cf_xml_path = os .path .join (args .foundation_path , "CFXMLInterface.framework" )
1221
- symlink_force (cf_xml_path , libincludedir )
1222
-
1223
- # Add symlinks for dispatch.
1224
- for library in ['libBlocksRuntime.so' , 'libdispatch.so' , 'libswiftDispatch.so' ]:
1225
- for subdir in ['lib' , 'src' , '' ]:
1226
- path = os .path .join (args .libdispatch_build_dir , subdir , library )
1227
- if os .path .exists (path ):
1228
- symlink_force (path , libswiftdir )
1229
- break
1230
-
1231
- # Add swiftmodules.
1232
- for module_file in ["Dispatch.swiftmodule" , "Dispatch.swiftdoc" ]:
1233
- paths = [
1234
- os .path .join (args .libdispatch_build_dir , 'src' , 'swift' , 'swift' , module_file ),
1235
- os .path .join (args .libdispatch_build_dir , 'src' , 'swift' , module_file ),
1236
- ]
1237
- for path in paths :
1238
- if os .path .exists (path ):
1239
- symlink_force (path , libincludedir )
1240
- continue
1241
-
1242
- symlink_force (os .path .join (args .libdispatch_source_dir ), os .path .join (libincludedir , "dispatch" ))
1243
-
1244
- # Add XCTest.
1245
- for module_file in ["XCTest.swiftmodule" , "XCTest.swiftdoc" ]:
1246
- symlink_force (os .path .join (args .xctest_path , 'swift' , module_file ), libincludedir )
1247
- symlink_force (os .path .join (args .xctest_path , "libXCTest.so" ), libswiftdir )
1248
-
1249
- return (libswiftdir , libincludedir )
1250
- return (None , None )
1251
-
1252
- (faketoolchain_libdir , faketoolchain_includedir ) = make_fake_toolchain ()
1152
+ make_fake_toolchain ()
1253
1153
1254
1154
# Build the package manager with itself.
1255
1155
@@ -1275,22 +1175,6 @@ def main():
1275
1175
# Append the versioning build flags.
1276
1176
build_flags .extend (create_versoning_args (args ))
1277
1177
1278
- if faketoolchain_includedir :
1279
- # This will take care of swiftmodules of Foundation and Dispatch.
1280
- build_flags .extend (["-Xswiftc" , "-I{}" .format (faketoolchain_includedir )])
1281
-
1282
- # Pass -F flag for CoreFoundation.
1283
- build_flags .extend (["-Xswiftc" , "-Xcc" , "-Xswiftc" , "-F{}" .format (faketoolchain_includedir )])
1284
-
1285
- # Pass -I for underlying Dispatch module.
1286
- build_flags .extend (["-Xswiftc" , "-I{}" .format (os .path .join (faketoolchain_includedir , "dispatch" ))])
1287
-
1288
- # Library search path.
1289
- build_flags .extend (["-Xlinker" , "-L{}" .format (faketoolchain_libdir )])
1290
-
1291
- # Add an RPATH, so that the tests can be run directly.
1292
- build_flags .extend (["-Xlinker" , "-rpath" , "-Xlinker" , faketoolchain_libdir ])
1293
-
1294
1178
# Add llbuild import flags.
1295
1179
for import_path in llbuild_import_paths (args ):
1296
1180
build_flags .extend (["-Xswiftc" , "-I%s" % import_path ])
0 commit comments