-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Build] Update SWIFT_TARGET_LIBRARY_NAME for swiftRuntime in new build. #78977
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
[Build] Update SWIFT_TARGET_LIBRARY_NAME for swiftRuntime in new build. #78977
Conversation
@swift-ci Please smoke test |
See #78516, which changed the name so that we can use |
PRIVATE | ||
-DSWIFT_RUNTIME | ||
-DSWIFT_TARGET_LIBRARY_NAME=swiftRuntime | ||
-DSWIFT_TARGET_LIBRARY_NAME=swiftRuntimeCore |
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 believe this is the only part that actually needs changing here so that the compatibility header picks things up correctly. This is an object library that only contains C/C++, so there shouldn't be any conflict with parts from the old build. Given that the Runtime
module depends on the overlay, it will have to be a separate "supplemental" library anyway.
We need to change `SWIFT_TARGET_LIBRARY_NAME` for the `swiftRuntime` target in the new build because of changes made to the old build system.
c8f882d
to
72d3c22
Compare
@swift-ci Please smoke test |
@@ -86,7 +86,7 @@ endif() | |||
target_compile_definitions(swiftRuntime | |||
PRIVATE | |||
-DSWIFT_RUNTIME | |||
-DSWIFT_TARGET_LIBRARY_NAME=swiftRuntime | |||
-DSWIFT_TARGET_LIBRARY_NAME=swiftRuntimeCore |
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 is incorrect, this should be swiftCore
. The way that this macro is used is with the CPP macro programming in Visibility.h
, and the only valid options are swiftCore
, swift_Concurrency
, swiftDistributed,
swift_Differentiation`. The value is used to select if the symbol is in the current module's ABI or not. See https://github.com/swiftlang/swift/blob/main/stdlib/public/SwiftShims/swift/shims/Visibility.h#L190-L214
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.
That's not the only place it gets used, and it was being used with swiftRuntime
in the past (which is not part of the list you're referring to). The macro we're tripping up over isn't actually one of the ones from Visibility.h
either; it's CompatibilityOverride.h
that's the problem in this case, and in particular COMPATIBILITY_OVERRIDE_INCLUDE_PATH_swiftRuntime[Core]
that was the issue.
All I'm trying to fix here is the build breakage, and only by updating the spelling that I've changed, rather than doing something entirely new.
We need to change
SWIFT_TARGET_LIBRARY_NAME
for theswiftRuntime
target in the new build because of changes made to the old build system.