@@ -159,7 +159,6 @@ class Target(object):
159
159
self .is_swift = False
160
160
# FIXME: Currently only C libraries are supported in bootstrap script.
161
161
self .is_c = False
162
- self .enable_module_interface = False
163
162
164
163
self .sources = []
165
164
self .module_root_dir = os .path .join (g_source_root , subpath or self .name )
@@ -203,7 +202,6 @@ class Target(object):
203
202
link_input_nodes , predecessor_node , target_map ):
204
203
# Compute the derived paths.
205
204
module_path = os .path .join (module_dir , "%s.swiftmodule" % (self .name ,))
206
- module_interface_path = os .path .join (module_dir , "%s.swiftinterface" % (self .name ,))
207
205
208
206
# Create the per-file entries.
209
207
swift_objects = []
@@ -232,13 +230,7 @@ class Target(object):
232
230
compile_swift_node = '<compile-swift-%s>' % (self .name ,)
233
231
link_input_nodes .append (compile_swift_node )
234
232
235
- if self .enable_module_interface :
236
- other_args .extend (["-enable-library-evolution" , "-emit-module-interface-path" , module_interface_path ])
237
- other_args .extend (["-swift-version" , "5" ])
238
- else :
239
- # FIXME: We should just update to the newer version.
240
- other_args .extend (["-swift-version" , "4" ])
241
-
233
+ other_args .extend (["-swift-version" , "4" ])
242
234
other_args .extend (["-module-cache-path" , os .path .join (args .sandbox_path , "ModuleCache" )])
243
235
244
236
print (" %s:" % json .dumps (compile_swift_node ), file = output )
@@ -648,8 +640,6 @@ def build_runtimes(targets, sandbox_path, args):
648
640
target_copy .name = 'PackageDescription'
649
641
target_copy .release = args .release
650
642
target_copy .swiftflags = ["-DPACKAGE_DESCRIPTION_%s" % (version )]
651
- if platform .system () == 'Darwin' :
652
- target_copy .enable_module_interface = True
653
643
build = llbuild (
654
644
os .path .join (sandbox_path , "runtimes" , version ), [target_copy ], args )
655
645
build .create_manifest ()
@@ -660,8 +650,6 @@ def build_runtimes(targets, sandbox_path, args):
660
650
def process_runtime_libraries (build , args , lib_path ):
661
651
module_input_path = os .path .join (
662
652
build .module_dir , "PackageDescription.swiftmodule" )
663
- moduleinterface_input_path = os .path .join (
664
- build .module_dir , "PackageDescription.swiftinterface" )
665
653
swiftdoc_input_path = os .path .join (
666
654
build .module_dir , "PackageDescription.swiftdoc" )
667
655
input_lib_path = os .path .join (
@@ -670,19 +658,13 @@ def process_runtime_libraries(build, args, lib_path):
670
658
mkdir_p (lib_path )
671
659
runtime_module_path = os .path .join (
672
660
lib_path , "PackageDescription.swiftmodule" )
673
- runtime_moduleinterface_path = os .path .join (
674
- lib_path , "PackageDescription.swiftinterface" )
675
661
runtime_swiftdoc_path = os .path .join (
676
662
lib_path , "PackageDescription.swiftdoc" )
677
663
678
- if platform .system () == 'Darwin' :
679
- distutils .file_util .copy_file (moduleinterface_input_path , runtime_moduleinterface_path ,
680
- update = 1 )
681
- else :
682
- distutils .file_util .copy_file (module_input_path , runtime_module_path ,
683
- update = 1 )
684
- distutils .file_util .copy_file (swiftdoc_input_path , runtime_swiftdoc_path ,
685
- update = 1 )
664
+ distutils .file_util .copy_file (module_input_path , runtime_module_path ,
665
+ update = 1 )
666
+ distutils .file_util .copy_file (swiftdoc_input_path , runtime_swiftdoc_path ,
667
+ update = 1 )
686
668
687
669
if platform .system () == 'Darwin' :
688
670
runtime_lib_path = os .path .join (lib_path , "libPackageDescription.dylib" )
@@ -691,7 +673,6 @@ def process_runtime_libraries(build, args, lib_path):
691
673
"-Xlinker" , "-all_load" ,
692
674
input_lib_path ,
693
675
"-sdk" , args .sysroot ,
694
- "-enable-library-evolution" ,
695
676
"-target" , "x86_64-apple-macosx10.10" ]
696
677
elif platform .system () == 'Windows' :
697
678
runtime_lib_path = os .path .join (lib_path , "PackageDescription.dll" )
@@ -715,7 +696,7 @@ def process_runtime_libraries(build, args, lib_path):
715
696
cmd .extend (["-module-cache-path" , os .path .join (args .sandbox_path , "ModuleCache" )])
716
697
717
698
subprocess .check_call (cmd )
718
- return (runtime_moduleinterface_path , runtime_module_path , runtime_swiftdoc_path , runtime_lib_path )
699
+ return (runtime_module_path , runtime_swiftdoc_path , runtime_lib_path )
719
700
720
701
721
702
def get_swift_build_tool_path ():
@@ -1387,38 +1368,29 @@ def main():
1387
1368
1388
1369
# Install the runtimes.
1389
1370
for version , runtime in processed_runtimes .items ():
1390
- runtime_moduleinterface_path , runtime_module_path , runtime_swiftdoc_path , runtime_lib_path = runtime
1371
+ runtime_module_path , runtime_swiftdoc_path , runtime_lib_path = runtime
1391
1372
install_path = os .path .join (lib_install_path , version )
1392
1373
1393
1374
# Install library.
1394
1375
installBinary (runtime_lib_path , install_path , args )
1395
1376
1396
- if platform .system () == 'Darwin' :
1397
- cmd = ["install" , "-m" , "0644" ,
1398
- runtime_moduleinterface_path , install_path ]
1399
- note ("installing %s: %s" % (
1400
- os .path .basename (runtime_moduleinterface_path ), ' ' .join (cmd )))
1401
- result = subprocess .call (cmd )
1402
- if result != 0 :
1403
- error ("module install failed with exit status %d" % (result ,))
1404
- else :
1405
- # Install module.
1406
- cmd = ["install" , "-m" , "0644" ,
1407
- runtime_module_path , install_path ]
1408
- note ("installing %s: %s" % (
1409
- os .path .basename (runtime_module_path ), ' ' .join (cmd )))
1410
- result = subprocess .call (cmd )
1411
- if result != 0 :
1412
- error ("module install failed with exit status %d" % (result ,))
1377
+ # Install module.
1378
+ cmd = ["install" , "-m" , "0644" ,
1379
+ runtime_module_path , install_path ]
1380
+ note ("installing %s: %s" % (
1381
+ os .path .basename (runtime_module_path ), ' ' .join (cmd )))
1382
+ result = subprocess .call (cmd )
1383
+ if result != 0 :
1384
+ error ("module install failed with exit status %d" % (result ,))
1413
1385
1414
- # Install swiftdoc.
1415
- cmd = ["install" , "-m" , "0644" ,
1416
- runtime_swiftdoc_path , install_path ]
1417
- note ("installing %s: %s" % (
1418
- os .path .basename (runtime_swiftdoc_path ), ' ' .join (cmd )))
1419
- result = subprocess .call (cmd )
1420
- if result != 0 :
1421
- error ("swiftdoc install failed with exit status %d" % (result ,))
1386
+ # Install swiftdoc.
1387
+ cmd = ["install" , "-m" , "0644" ,
1388
+ runtime_swiftdoc_path , install_path ]
1389
+ note ("installing %s: %s" % (
1390
+ os .path .basename (runtime_swiftdoc_path ), ' ' .join (cmd )))
1391
+ result = subprocess .call (cmd )
1392
+ if result != 0 :
1393
+ error ("swiftdoc install failed with exit status %d" % (result ,))
1422
1394
1423
1395
1424
1396
# Copy the libSwiftPM library to a directory, if we've been asked to do so.
0 commit comments