Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify the SDK layout #78724

Open
compnerd opened this issue Jan 17, 2025 · 3 comments
Open

Simplify the SDK layout #78724

compnerd opened this issue Jan 17, 2025 · 3 comments
Labels
task triage needed This issue needs more specific labels

Comments

@compnerd
Copy link
Member

Description

We currently have a SDK layout of:

/usr/lib/swift/<platform>/<arch>

It would be nice to simplify this down to /usr/lib or /usr/lib/<triple> to allow a simpler SDK construction.

Additional information

No response

@compnerd compnerd added task triage needed This issue needs more specific labels labels Jan 17, 2025
@compnerd
Copy link
Member Author

CC: @etcwilde

@etcwilde
Copy link
Contributor

Yes please. If we do reduce it like this, CMake will handle setting up the install paths correctly without us needing to do anything clever.

@finagolfin
Copy link
Member

Are you suggesting getting rid of /usr/lib/swift/<platform>/<arch>/ alone or /usr/lib/swift/ altogether? If the former, there are very few files left in there for most platforms, a few remaining swiftmodules, the libc header/modulemap, and the small runtime object file:

> ls swift-DEVELOPMENT-SNAPSHOT-2025-01-05-a-fedora39/usr/lib/swift/linux/x86_64/
Dispatch.swiftdoc     glibc.modulemap  swiftrt.o        XCTest.swiftmodule
Dispatch.swiftmodule  SwiftGlibc.h     XCTest.swiftdoc

If the latter, the problem is that it is a mix of various headers and libraries, some of which collide with system packages like libdispatch:

> ls swift-DEVELOPMENT-SNAPSHOT-2025-01-05-a-fedora39/usr/lib/swift/
apinotes  CoreFoundation  _FoundationCShims     host                        linux     pm
Block     dispatch        _foundation_unicode   _InternalSwiftScan          migrator  shims
clang     embedded        FrameworkABIBaseline  _InternalSwiftStaticMirror  os        swiftToCxx

I've moved the Swift runtime libraries in the Termux app for Android into <sysroot>/usr/lib/, well, technically symlinks to them. But just like our Swift-forked lldb and clang collide with system packages, I don't see anybody putting in the effort to move all the rest of this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
task triage needed This issue needs more specific labels
Projects
None yet
Development

No branches or pull requests

3 participants