Skip to content

[5.1] Module filename and location changes #23021

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 8 commits into from
Mar 2, 2019

Conversation

beccadax
Copy link
Contributor

@beccadax beccadax commented Mar 1, 2019

This PR cherry-picks changes from three PRs to swift-5.1-branch:

Collectively, they rearrange the standard library and overlay modules to be laid out more like ordinary modules and add support for new target-specific module filenames.

@beccadax
Copy link
Contributor Author

beccadax commented Mar 1, 2019

@swift-ci please test

jrose-apple and others added 8 commits March 1, 2019 13:20
…lang#21797)

This changes the Swift resource directory from looking like

    lib/
      swift/
        macosx/
          libswiftCore.dylib
          libswiftDarwin.dylib
          x86_64/
            Swift.swiftmodule
            Swift.swiftdoc
            Darwin.swiftmodule
            Darwin.swiftdoc

to

    lib/
      swift/
        macosx/
          libswiftCore.dylib
          libswiftDarwin.dylib
          Swift.swiftmodule/
            x86_64.swiftmodule
            x86_64.swiftdoc
          Darwin.swiftmodule/
            x86_64.swiftmodule
            x86_64.swiftdoc

matching the layout we use for multi-architecture swiftmodules
everywhere else (particularly frameworks).

There's no change in this commit to how Linux swiftmodules are
packaged. There's been past interest in going the /opposite/ direction
for Linux, since there's not standard support for fat
(multi-architecture) .so libraries. Moving the .so search path /down/
to an architecture-specific directory on Linux would allow the same
resource directory to be used for both host-compiling and
cross-compiling.

rdar://problem/43545560
…wiftlang#22907)

This field is reverse-path-sorted, so the order depends on what
architecture we're compiling for. That's not what's being tested,
so just use a CHECK-DAG.

rdar://problem/48377454
Create a helper type to represent the .swiftmodule/.swiftdoc filename pair and use it in SerializedModuleLoaderBase::findModule().
…from 1-2 target-specific names to 0-N target-specific names.
When loading a module supporting multiple targets, the module loader now looks for a file named with a normalized version of the target triple first, and only falls back to the architecture name if the normalized triple is not found.
* Adds documentation comments.
* Turns redundant cases into comments.
* Removes the else branch in a couple “if (…) return …; else return …;” patterns.
@beccadax
Copy link
Contributor Author

beccadax commented Mar 1, 2019

Looks like I resolved a merge conflict in one of the tests incorrectly. Force-pushing a corrected version.

@beccadax beccadax force-pushed the target-practice-5.1 branch from 44974c2 to 353179a Compare March 1, 2019 21:22
@beccadax
Copy link
Contributor Author

beccadax commented Mar 1, 2019

@swift-ci please test

@swift-ci

This comment has been minimized.

@swift-ci
Copy link
Contributor

swift-ci commented Mar 1, 2019

Build failed
Swift Test OS X Platform
Git Sha - 44974c20de76fcbf0969fd2c8ee2202832d79e45

@beccadax
Copy link
Contributor Author

beccadax commented Mar 1, 2019

@swift-ci please test OS X platform

@swift-ci

This comment has been minimized.

@beccadax beccadax merged commit b89b723 into swiftlang:swift-5.1-branch Mar 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants