Skip to content

Runtimes: support generic metadata prespecialization for all of Core #79188

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

Conversation

edymtt
Copy link
Contributor

@edymtt edymtt commented Feb 6, 2025

Also provide a flag to enabled/disable it.

Addresses rdar://144255917

@edymtt
Copy link
Contributor Author

edymtt commented Feb 6, 2025

@swift-ci please smoke test

@@ -103,6 +103,13 @@ option(SwiftCore_ENABLE_FILESYSTEM_SUPPORT "Build for systems that have a filesy
option(SwiftCore_ENABLE_OS_TRACE_LAZY_INIT "Use os_trace call to check if lazy init has been completed before making os_signpost calls." ${SwiftCore_HAS_OS_TRACE})
option(SwiftCore_HAS_DARWIN_LIBMALLOC "Use Darwin malloc features" ${APPLE})

if("${APPLE}" OR "${LINUX}")
Copy link
Member

@etcwilde etcwilde Feb 6, 2025

Choose a reason for hiding this comment

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

This is what cmake/modules/DefaultSettings.cmake is for.
"${APPLE}" should be APPLE and "${LINUX}" should be LINUX, but the ON cases can also just go under the appropriate platforms in DefaultSettings.cmake, and then use defaulted_option(SwiftCore_ENABLE_PRESPECIALIZATION "Enable generic metadata prespecialization") from this file.

Edit: default_set -> defaulted_option

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the feedback, and sorry for not reading the code more thoroughly before hand -- this is addressed in f757406

@edymtt edymtt force-pushed the edymtt/apply-prespecialize-generic-metadata-to-all-of-core branch from 9cb5327 to f757406 Compare February 6, 2025 18:42
@edymtt
Copy link
Contributor Author

edymtt commented Feb 6, 2025

@swift-ci please smoke test

@edymtt
Copy link
Contributor Author

edymtt commented Feb 6, 2025

Waiting for swiftlang/llvm-project#9970 to land before rekicking LInux tests

@edymtt edymtt force-pushed the edymtt/apply-prespecialize-generic-metadata-to-all-of-core branch from f757406 to c33c8fc Compare February 6, 2025 22:11
@edymtt
Copy link
Contributor Author

edymtt commented Feb 6, 2025

@swift-ci please smoke test

@edymtt
Copy link
Contributor Author

edymtt commented Feb 6, 2025

@swift-ci please smoke test Linux

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.

How come it isn't enabled on Windows?

@edymtt
Copy link
Contributor Author

edymtt commented Feb 7, 2025

Because I based my default on what the current code is doing, thinking it had a reasonable default worth preserving.

Digging a bit deeper, that was done since at the time prespecialization was not supported for Windows -- since then the support has been added, but the CMake code has not been updated to reflect that (and I could not find that being overridden in build.ps1 not swift-build).

Sorry for missing this context, I will amend this.

Also provide a flag to enabled/disable it.

Addresses rdar://144255917
@edymtt edymtt force-pushed the edymtt/apply-prespecialize-generic-metadata-to-all-of-core branch from c33c8fc to 2a36723 Compare February 7, 2025 15:40
@edymtt
Copy link
Contributor Author

edymtt commented Feb 7, 2025

@swift-ci please smoke test

@edymtt
Copy link
Contributor Author

edymtt commented Feb 7, 2025

I need to rekick Windows testing when #79214 is merged

@edymtt
Copy link
Contributor Author

edymtt commented Feb 7, 2025

@swift-ci please smoke test Windows

@edymtt edymtt merged commit a3fac71 into swiftlang:main Feb 10, 2025
3 checks passed
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.

3 participants