-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[Backtracing] Add missing CxxStdlib dependency. #79057
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
@swift-ci Please smoke test |
Gah. Somehow doing that has broken the static build of the backtracer by pulling in some shared objects. Continuing to look at the problem. |
Ah. It's CMake again; because I just added the |
e2b3307
to
e239ed2
Compare
@swift-ci Please smoke test |
@swift-ci Please smoke test macOS platform |
macOS is failing to clone now :-( But I think I need an extra dependency declaration, which might also break things again. Testing locally now. |
To do this we also need to fix AddSwiftStdlib because if you set the `INSTALL_WITH_SHARED` flag, the CMake scripts don't make a target with the `-static` suffix, but AddSwiftStdlib also assumes that it should dad `-static` to any module dependencies when building a static library.
e239ed2
to
884cf75
Compare
@swift-ci Please smoke test |
@swift-ci Please smoke test macOS platform |
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 LGTM in the context of C++ interop and CxxStdlib. Thanks!
I'm not very familiar with the other static Swift libraries that are INSTALL_WITH_SHARED
though.
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 makes sense to me -- thanks a lot for tackling this!
@@ -1317,38 +1317,46 @@ function(add_swift_target_library_single target name) | |||
# Set compile and link flags for the non-static target. | |||
# Do these LAST. | |||
set(target_static) | |||
if(SWIFTLIB_SINGLE_IS_STDLIB AND SWIFTLIB_SINGLE_STATIC AND NOT SWIFTLIB_SINGLE_INSTALL_WITH_SHARED) | |||
if(SWIFTLIB_SINGLE_IS_STDLIB AND SWIFTLIB_SINGLE_STATIC) |
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.
Wait, when is SWIFTLIB_SINGLE_STATIC
set, but we're not building static libraries?
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.
Oh, when building swiftCxx
. Neat.
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.
Yeah, I think it's the only "normal" case where that happens. The compatibility libraries use these flags also, I think, but they probably aren't being used as a dependency (swiftCxxStdlib
presumably wasn't either until now).
To do this we also need to fix AddSwiftStdlib because if you set the
INSTALL_WITH_SHARED
flag, the CMake scripts don't make a target with the-static
suffix, but AddSwiftStdlib also assumes that it should dad-static
to any module dependencies when building a static library.