-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Runtimes][CMake] Add Distributed to Supplemental build #81529
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
[Runtimes][CMake] Add Distributed to Supplemental build #81529
Conversation
daaa868
to
440ff7b
Compare
@swift-ci please smoke test |
CACHE FILEPATH "Location for private build system extension") | ||
|
||
include(CxxStandard) | ||
include(SwiftCallingConventions) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is distributed special and the only one to perform these checks? I think that we should replicate them across all the builds if we want to perform these.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Of the Supplemental libraries we are converting, only Distributed and Observation use Swift calling conventions -- since in this rewrite we are trying to apply flags/features only to the libraries that only strictly need those, I thought it was sound not require to apply those to Synchronization and Differentiation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Core definitely uses the swift calling conventions as does the Concurrency runtime.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, my analysis was focused on the Supplemental libraries alone -- Core and Concurrency are running these checks already with CompilerSettings.cmake
|
||
configure_file("CMakeConfig.h.in" | ||
"${PROJECT_BINARY_DIR}/include/swift/Runtime/CMakeConfig.h" | ||
ESCAPE_QUOTES @ONLY) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems sketchy. We shouldn't be re-generating the configuration for the runtime build, but should distribute it or pull it from the build tree.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me see what I can do -- possibly a find module may help here, need to think about the distribution scenario.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we install/export this from Core, find_package(SwiftCore)
should be able to wire this up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Once the Core and supplemental libraries are built, the CMakeConfig.h
file aren't used by anything so it shouldn't be necessary so installing it isn't great.
You're right that it's sketchy if the projects get out of sync. I do think that the SwiftCoreConfig.cmake
should export the appropriate settings and that the supplemental libraries should import them to ensure that the values are kept in sync.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that for the time being we can control that from the outside then; I don't think that we should regenerate it (point into the build tree with CMAKE_CXX_FLAGS
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I adopted this latter approach -- to better highlight this in code, I have introduced a variable named ${PROJECT_NAME}_PATH_TO_SWIFT_RUNTIME_HEADERS
to point at the path containing swift/Runtime
and use that as part of target_include_directories
, let me know if you think that's appropriate
swiftCore | ||
swift_Concurrency) | ||
# swiftDarwin/Libc/Platform | ||
# builtin_float |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
_Builtin_float
is part of the overlays, we should introduce a find_project(SwiftOverlay)
for this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for suggesting this should be more generic -- I was thinking of focusing specifically on _Builtin_float
, but that may be too granular.
440ff7b
to
fa2add6
Compare
(This is a rebase to account for merge conflicts and changes in #81558, no review feedback has been incorporated yet) |
fa2add6
to
256e788
Compare
256e788
to
addcebb
Compare
@swift-ci please smoke test |
macOS test failure is unrelated to this change
|
@swift-ci please smoke test |
@swift-ci please smoke test macOS |
Do not enable this yet, as this would relies on a few find modules that are not available at the moment. Addresses rdar://151389005
Addresses rdar://154230645
addcebb
to
7348469
Compare
@swift-ci please smoke test |
Also add a couple modules to use Swift calling conventions and set the correct C++ standard.
Do not enable this yet, as this would relies on a few find modules that
are not available at the moment.
Addresses rdar://151389005