-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Remove --copy-subdirs from recursive-lipo. #62492
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Recursive lipo handles a mix of directories where some subdirectories build only a single slice for the host and other subdirectories build universal binaries (e.g., for a target). The former are lipo'd together, while the latter were copied verbatim. The `--copy-subdirs` option indicated that an entire subtree should be copied verbatim, and this was applied to `lib/swift` to cover all of the target libraries, with single-file exceptions provided by `--explicit-src-files`. However, this doesn't account for host content under `lib/swift` that needs to be lipo'd, i.e., the newly-introduced shared libraries in `lib/swift/host` that are part of host tools. Revise the semantics of `--copy-subdirs`. Instead of copying the entire directory verbatim, perform the normal recursion into these subdirectories. When there are executable files that aren't identical, check whether they have overlapping architectures: if they don't, lipo them. If they do, and we're in a "copied" subdirectory, take one of the files because they're considered equivalent. This gives a more fine-grained semantics to `--copy-subdirs` that allows us to both lipo executables/shared libraries and also construct Swift modules.
This option has been subsumed by the improved semantics of `--copy-subdirs`.
We want the `--copy-subdirs` behavior all the time, so remove it as an option and use the new semantics everywhere.
@swift-ci please build toolchain |
@swift-ci please smoke test |
@swift-ci please smoke test |
@swift-ci please build toolchain |
@swift-ci please smoke test macOS |
@swift-ci please test |
@swift-ci please build toolchain |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Recursive lipo handles a mix of directories where some subdirectories build only a single slice for the host and other subdirectories build universal binaries (e.g., for a target). The former are lipo'd together, while the latter were copied verbatim.
The
--copy-subdirs
option indicated that an entire subtree should be copied verbatim, and this was applied tolib/swift
to cover all of the target libraries, with single-file exceptions provided by--explicit-src-files
. However, this doesn't account for host content underlib/swift that
needs to be lipo'd, i.e., the newly-introduced shared libraries inlib/swift/host
that are part of host tools.Remove both
--copy-subdirs
and--explicit-src-files
. Instead, perform the normal recursion into all subdirectories. When there are executable files that aren't identical, check whether they have overlapping architectures: if they don't, lipo them. If they do, take one ofthe files because they're considered equivalent. This gives consistent lip behavior for all
executables/shared libraries and also properly assemblies Swift modules from multiple host compiler directories.