-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[static][stdlib] Any ELF platform can build static binaries. #32736
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
base: main
Are you sure you want to change the base?
Changes from all commits
39bb1b2
02a7936
4c5b57f
af31e09
9cea66b
e1c8011
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
// See SR-13165 | ||
// UNSUPPORTED: static_stdlib | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is not obvious, could you add a comment explaining why it is not supported? (Here and in every other test, please.) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. Since the explanation is somewhat wordy, I've created a Jira bug for the UNSUPPORTED annotations and referenced to the bug. Do you think the (unrelated) XFAIL elsewhere needs a comment as well? |
||
|
||
// RUN: echo %s > %t.filelist.txt | ||
// RUN: not --crash %target-swift-frontend -interpret -filelist %t.filelist.txt 2>&1 | %FileCheck %s | ||
|
This file was deleted.
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.
Ugh; I really wish that we could use
CMAKE_DL_LIBS
, unfortunately, the custom cross-compilation build system in Swift doesn't support that. We already have the special handling fordl
in_add_target_variant_link_flags
, can we re-use that rather than duplicate knowledge of libdl here? Alternatively, perhaps we should consider creating aSWIFT_DL_LIBS_${SWIFT_HOST_VARIANT_SDK}_${SWIFT_HOST_VARIANT_ARCH}
variable to indicate if/when libdl is needed on a 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 one's a little more complex, since it appears (to me) that _add_target_variant_link_flags works with a CMake target, and maybe there's a way to create a dummy target and pull the link libraries. The latter is probably simpler, but I'll probably need to spin up a Linux build to do this properly.
Added a TODO and I'll take a look at this in a later PR. Does that sound reasonable?