Skip to content

Commit 01817b6

Browse files
authored
Merge pull request #324 from ahoppen/pr/remove-support-for-installing-modules
Remove support for installing the swift modules in a toolchain
2 parents d5d0cc3 + 1ca7810 commit 01817b6

File tree

1 file changed

+4
-29
lines changed

1 file changed

+4
-29
lines changed

build-script.py

Lines changed: 4 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -369,7 +369,7 @@ def __init__(
369369
self.swiftpm_call.extend(["--verbose"])
370370
self.verbose = verbose
371371

372-
def build(self, product_name, module_group_path=""):
372+
def build(self, product_name):
373373
print("** Building " + product_name + " **")
374374
command = list(self.swiftpm_call)
375375
command.extend(["--product", product_name])
@@ -607,7 +607,7 @@ def check_and_sync(file_path, install_path):
607607
fatal_error("install failed with exit status %d" % (result,))
608608

609609

610-
def install(build_dir, dylib_dir, swiftmodule_base_name, stdlib_rpath):
610+
def install(build_dir, dylib_dir, stdlib_rpath):
611611
for dylib_name in get_installed_dylib_names():
612612

613613
dylib_path = os.path.join(build_dir, dylib_name)
@@ -621,15 +621,6 @@ def install(build_dir, dylib_dir, swiftmodule_base_name, stdlib_rpath):
621621
file_path=dylib_path, install_path=os.path.join(dylib_dir, dylib_name)
622622
)
623623

624-
# Optionally install .swiftmodule
625-
if swiftmodule_base_name:
626-
module_path = os.path.join(build_dir, "SwiftSyntax.swiftmodule")
627-
doc_path = os.path.join(build_dir, "SwiftSyntax.swiftdoc")
628-
module_dest = swiftmodule_base_name + ".swiftmodule"
629-
doc_dest = swiftmodule_base_name + ".swiftdoc"
630-
check_and_sync(file_path=module_path, install_path=module_dest)
631-
check_and_sync(file_path=doc_path, install_path=doc_dest)
632-
633624

634625
# -----------------------------------------------------------------------------
635626
# Arugment Parsing
@@ -654,17 +645,6 @@ def install(build_dir, dylib_dir, swiftmodule_base_name, stdlib_rpath):
654645
"""
655646

656647

657-
_SWIFTMODULE_BASE_NAME_HELP = """
658-
The name under which the Swift module should be installed. A .swiftdoc and
659-
.swiftmodule file extension will be added to this path and the corresponding
660-
files will be copied there.
661-
662-
Example /path/to/SwiftSyntax.swiftmodule/x86_64 copies files to
663-
/path/to/SwiftSyntax.swiftmodule/x86_64.swiftmodule and
664-
/path/to/SwiftSyntax.swiftmodule/x86_64.swiftdoc
665-
"""
666-
667-
668648
def parse_args():
669649
parser = argparse.ArgumentParser(
670650
formatter_class=argparse.RawDescriptionHelpFormatter, description=_DESCRIPTION
@@ -751,10 +731,6 @@ def parse_args():
751731
"--dylib-dir", help="The directory to where the .dylib should be installed."
752732
)
753733

754-
install_group.add_argument(
755-
"--swiftmodule-base-name", help=_SWIFTMODULE_BASE_NAME_HELP
756-
)
757-
758734
# -------------------------------------------------------------------------
759735
test_group = parser.add_argument_group("Test")
760736

@@ -809,7 +785,6 @@ def main():
809785
install(
810786
build_dir=build_dir,
811787
dylib_dir=args.dylib_dir,
812-
swiftmodule_base_name=args.swiftmodule_base_name,
813788
stdlib_rpath=stdlib_rpath,
814789
)
815790
sys.exit(0)
@@ -859,8 +834,8 @@ def main():
859834
)
860835
# Until rdar://53881101 is implemented, we cannot request a build of multiple
861836
# targets simultaneously. For now, just build one product after the other.
862-
builder.build("SwiftSyntax", module_group_path=GROUP_INFO_PATH)
863-
builder.build("SwiftSyntaxParser", module_group_path=GROUP_INFO_PATH)
837+
builder.build("SwiftSyntax")
838+
builder.build("SwiftSyntaxParser")
864839

865840
# Only build lit-test-helper if we are planning to run tests
866841
if args.test:

0 commit comments

Comments
 (0)