Skip to content

Runtimes: introduce SwiftOnoneSupport #78726

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

Merged
merged 2 commits into from
Feb 13, 2025

Conversation

edymtt
Copy link
Contributor

@edymtt edymtt commented Jan 17, 2025

The main goal for now is to have this building, with little concern about matching the build flags used currently.

Keep it disabled by default on Apple platforms.

Addresses rdar://143151393

@edymtt
Copy link
Contributor Author

edymtt commented Jan 17, 2025

@swift-ci please smoke test

@edymtt edymtt force-pushed the edymtt/add-ononesupport-to-runtimes branch from 1bccfb4 to 2073907 Compare January 23, 2025 17:08
@edymtt edymtt force-pushed the edymtt/add-ononesupport-to-runtimes branch from 2073907 to bca4796 Compare February 3, 2025 15:35
@edymtt
Copy link
Contributor Author

edymtt commented Feb 3, 2025

@swift-ci please smoke test

The main goal for now is to have this building, with little
concern about matching the build flags used currently.

Keep it disabled by default on Apple platforms.

Addresses rdar://143151393
@edymtt edymtt force-pushed the edymtt/add-ononesupport-to-runtimes branch from bca4796 to c1257eb Compare February 3, 2025 19:36
@edymtt edymtt requested a review from shahmishal as a code owner February 3, 2025 19:36
@edymtt
Copy link
Contributor Author

edymtt commented Feb 3, 2025

@swift-ci please smoke test

Copy link
Member

@etcwilde etcwilde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking for the missing flag, but it looks like there are ~1300 missing public symbols.

Copy link
Member

@etcwilde etcwilde left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like we're at least missing -Xfrontend -prespecialize-generic-metadata. That doesn't seem to get all of the generic specializations back though so we're likely missing more.

@edymtt
Copy link
Contributor Author

edymtt commented Feb 5, 2025

I could comb through the CMake logic to find the missing flags, but it may be more efficient to ensure the stdlib build invoked with ExternalProject_Add has verbose output in CI and comb the resulting log -- opened #79174 as a way to achieve that

@edymtt
Copy link
Contributor Author

edymtt commented Feb 11, 2025

I've landed #79188 and #79266 to account for the missing flags.

@edymtt
Copy link
Contributor Author

edymtt commented Feb 11, 2025

@swift-ci please smoke test

@edymtt
Copy link
Contributor Author

edymtt commented Feb 12, 2025

@swift-ci please smoke test Linux

@edymtt
Copy link
Contributor Author

edymtt commented Feb 12, 2025

@swift-ci please smoke test Windows

@edymtt
Copy link
Contributor Author

edymtt commented Feb 12, 2025

From a macOS build at desk, it looks like the SwiftOnoneSupport built this way generates the same symbols as the one build the old way (except the magic install name symbols, since we are not setting SwiftCore_ENABLE_BACKDEPLOYMENT_SUPPORT when configuring this build)

> diff -u <(nm -arch arm64 -g lib/swift/macosx/libswiftSwiftOnoneSupport.dylib| awk '{print $3}' | sort -u | xcrun swift-demangle) <(nm -arch arm64 -g swift-stdlib-macosx-arm64-core-prefix/src/swift-stdlib-macosx-arm64-core-build/SwiftOnoneSupport/libswiftSwiftOnoneSupport.dylib| awk '{print $3}'  | sort -u | xcrun swift-demangle) 
--- /dev/fd/11	2025-02-12 08:20:11
+++ /dev/fd/12	2025-02-12 08:20:11
@@ -1,5 +1,4 @@
 
-$ld$previous$@rpath/libswiftSwiftOnoneSupport.dylib$$1$10.9$10.14.4$$
 generic specialization <Swift.Character> of Swift.Array.init() -> [A]
 generic specialization <Swift.String.UnicodeScalarView> of Swift.Array.init() -> [A]
 generic specialization <Swift.String.UTF8View> of Swift.Array.init() -> [A]

Copy link
Member

@compnerd compnerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noticed some bleeding whitespace

@edymtt
Copy link
Contributor Author

edymtt commented Feb 12, 2025

@swift-ci please smoke test

@edymtt edymtt merged commit f8bba96 into swiftlang:main Feb 13, 2025
3 checks passed
@edymtt edymtt deleted the edymtt/add-ononesupport-to-runtimes branch February 26, 2025 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants