Skip to content

Commit

Permalink
Merge pull request #22 from dsp-testing/redsun82/remove-toolchain
Browse files Browse the repository at this point in the history
Remove unneeded sdk
  • Loading branch information
redsun82 authored Feb 19, 2024
2 parents a331351 + ac5e8bd commit 099b557
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions pkg_swift_llvm.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,23 +119,6 @@ def copy_includes(src, tgt):
tgtfile.parent.mkdir(parents=True, exist_ok=True)
shutil.copy(srcfile, tgtfile)


def export_sdk(tgt, swift_source_tree, swift_build_tree):
print("assembling sdk")
srcdir = swift_build_tree / "lib" / "swift"
tgtdir = tgt / "usr" / "lib" / "swift"
if get_platform() == "linux":
srcdir /= "linux"
tgtdir /= "linux/x86_64"
else:
srcdir /= "macosx"
for mod in srcdir.glob("*.swiftmodule"):
shutil.copytree(mod, tgtdir / mod.name)
shutil.copytree(swift_source_tree / "stdlib" / "public" / "SwiftShims" / "swift" / "shims",
tgt / "usr" / "lib" / "swift" / "shims",
ignore=shutil.ignore_patterns('CMakeLists.txt'))


def export_stdlibs(exported_dir, swift_build_tree):
ext = 'dylib'
platform = 'linux' if get_platform() == 'linux' else 'macosx'
Expand Down Expand Up @@ -199,7 +182,6 @@ def main(opts):
exported.mkdir()
export_libs(exported, libs, swift_build_tree)
export_headers(exported, opts.swift_source_tree, llvm_build_tree, swift_build_tree)
export_sdk(exported / "sdk", opts.swift_source_tree, swift_build_tree)

zip_dir(exported, opts.output)

Expand Down

0 comments on commit 099b557

Please sign in to comment.