Skip to content

Commit

Permalink
Keep the ncurses library and a symlink on the CI when testing buildin…
Browse files Browse the repository at this point in the history
…g llbuild/SwiftPM with the SDK, before finally removing them
  • Loading branch information
finagolfin committed Oct 7, 2024
1 parent aa29efb commit 169c54b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/sdks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ jobs:
echo "Creating ${TRIPLE} from ${MERGEDIR}…"
# Remove executables and unused toolchain headers/libraries
rm -r usr/bin usr/lib/swift/pm usr/lib/libsqlite3.so usr/lib/libncursesw.so
rm -r usr/bin usr/lib/swift/pm usr/lib/libsqlite3.so usr/lib/lib{curses,ncurses}.so
rm -r usr/include/ncurses* usr/include/sqlite3*.h usr/lib/terminfo usr/share/{tabset,terminfo}
mkdir -p usr/lib/${TRIPLE}
Expand Down
4 changes: 4 additions & 0 deletions get-packages-and-swift-source.swift
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,10 @@ for soFile in try fmd.contentsOfDirectory(atPath: libPath) {
}
}

// Rename ncurses for llbuild and add a symlink for SwiftPM
try fmd.moveItem(atPath: libPath.appendingPathComponent("libncursesw.so"), toPath: libPath.appendingPathComponent("libcurses.so"))
try fmd.createSymbolicLink(atPath: libPath.appendingPathComponent("libncurses.so"), withDestinationPath: "libcurses.so")

// update the rpath to be $ORIGIN, set the soname, and update all the "needed" sections for each of the peer libraries
for soFile in try fmd.contentsOfDirectory(atPath: libPath).filter({ $0.hasSuffix(".so")} ) {
let soPath = libPath.appendingPathComponent(soFile)
Expand Down

0 comments on commit 169c54b

Please sign in to comment.