-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
[Debug] Introduce use of DebugDescription macro in stdlib #71425
[Debug] Introduce use of DebugDescription macro in stdlib #71425
Conversation
@swift-ci smoke test |
@swift-ci test |
@swift-ci Please clean test |
It seems the failures are somehow caused by the macro emitting |
@swift-ci test |
@swift-ci test windows |
1 similar comment
@swift-ci test windows |
@swift-ci test |
1 similar comment
@swift-ci test |
@swift-ci test linux |
@swift-ci test macOS |
While working on #71425, I hit an assert indicating the `@_section` attribute was not handled in `DeclDeserializer::deserializeDeclCommon`. This change adds the missing deserialization for the `@_section` attribute.
d202bc9
to
2736660
Compare
@swift-ci test |
The macro is a compile time only dependency.
@swift-ci test |
@@ -310,6 +315,10 @@ list(APPEND swift_stdlib_compile_flags "-enable-experimental-feature" "Freestand | |||
list(APPEND swift_stdlib_compile_flags "-enable-experimental-feature" "Extern") | |||
list(APPEND swift_stdlib_compile_flags "-enable-experimental-feature" "BitwiseCopyable") | |||
|
|||
list(APPEND swift_stdlib_compile_flags "-external-plugin-path" | |||
"${CMAKE_BINARY_DIR}/lib/swift/host/plugins#${CMAKE_BINARY_DIR}/bin/swift-plugin-server") |
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.
It seems this change broke cross-host builds: https://ci.swift.org/job/oss-swift-package-macos/2718/console
sandbox-exec: execvp() of '/Users/ec2-user/jenkins/workspace/oss-swift-package-macos/build/buildbot_osx/swift-macosx-arm64/bin/swift-plugin-server' failed: Bad CPU type in executable
I guess we need to use swift-plugin-server under SWIFT_NATIVE_SWIFT_TOOLS_PATH
if it's specified.
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, working on it
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.
Is there a way to validate the cross-host builds from the PR?
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.
Thank you!
Introduces the first use of
@_DebugDescription
in the standard library, applying it toObjectIdentifier
. In order to use the DebugDescription macro in the stdlib, the following changes are required:libSwiftMacros.dylib
), not those from the SDK. This is addressed by adding an explicit-external-plugin-path
flag that overrides the defaults generated by the compiler (which uses SDK paths, where the macro may or may not exist, and may not be the current version).@_section
, compilation enables theSymbolLinkageMarkers
feature.Note that the use of DebugDescription is conditionally enabled for the following reasons:
The dynamic loader error causing issues with Linux CI is:
This PR depended on #71639, #71588, and #71685.