-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Remove swiftImageInspectionShared #15692
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
@lanza did you try building a static binary with this toolchain? |
@swift-ci please test |
@compnerd I haven't actually tested this but it appears to remove |
Huh? This commit does not remove that file. |
Sorry, I mis-read the diff and didn't see the line
So thought that it was not getting compiled in. The point of the Normal dynamic binary and binary built with Statically linked binary built with Once #15183 is applied it will make more sense. |
@spevans I'm really not sure I follow the logic here.
Why not just reuse the existing code path and remove the single function in the case of the static runtime build? This is basically the same issue that I raised on #15183. I'd like to understand what exactly the motivation is to duplicate the runtime into a second build when you are simply trying to remove a single reference (i.e. |
I wasn't clear enough in my previous answer, but
Its case 3. which causes issues due to its mixture of static libraries in a dynamic executable. If we wanted to eliminate the ImageInspection stub libraries we could by explicitly producing 2 libswiftCore.a and end up with:
As to your query about For static binaries this can be short circuited to simply add the section in the |
(responding in reverse order since the latter is more involved) I agree that short-circuiting avoids the linked list maintenance, but that really is 4 writes, which is really not that expensive and avoids a bunch of code duplication. I think that the benefits of a single codepath there outweighs the benefits of the tiny optimization that you get. The "overhead" in the As to the point of the merged static runtimes, I think that it might be nicer to have the separate builds of the runtime. I'd like to get @bob-wilson's and @jrose-apple's opinion on this as well. I think that longer term, having a static runtime with a dynamic executable would probably be deprecated? This really is only needed right now due to the unstable ABI, and as discussed offline with @bob-wilson, I think that it makes sense to switch to a resilient ABI across the board in one go. That would really obviate the need for the static runtime + dynamic executable case. In such a case, with the merged constructor, I think that the difference really would become which runtime library you link against (libswiftCore.so vs libswiftCore.a). This greatly reduces the overall complexity in the system. Of course this leaves us with the difficult problem of naming. For the naming, I think that we should go for something confusing rather than clear if my assumption about future obsolescence is correct. We could do something like:
This indicates that the runtime itself is built with the fragile (Apple parlance, I don't think that Linux/Windows have a nice term for this) runtime. The benefit of this slightly obscure naming is that we would simply drop |
Remove the
swiftImageInspectionShared
since #12758 removed the need for it's existence.