Skip to content

On Apple platforms, use swiftmodule directories for the stdlib #21797

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 1 commit into from
Feb 19, 2019

Conversation

jrose-apple
Copy link
Contributor

@jrose-apple jrose-apple commented Jan 11, 2019

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

@jrose-apple
Copy link
Contributor Author

@swift-ci Please clean test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 43a5da48d60120d78598fcfcffd1965cc85db2bc

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 43a5da48d60120d78598fcfcffd1965cc85db2bc

@jrose-apple
Copy link
Contributor Author

@swift-ci Please clean test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 43a5da48d60120d78598fcfcffd1965cc85db2bc

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 43a5da48d60120d78598fcfcffd1965cc85db2bc

@jrose-apple
Copy link
Contributor Author

apple/swift-lldb#1203
@swift-ci Please clean test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - e0437be2eb59d45c91b61e33c7960fcd9ad54f7b

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - e0437be2eb59d45c91b61e33c7960fcd9ad54f7b

@jrose-apple
Copy link
Contributor Author

A little bit further every time…

@jrose-apple
Copy link
Contributor Author

@swift-ci Please clean test

@jrose-apple
Copy link
Contributor Author

Oops.

apple/swift-lldb#1203
@swift-ci Please clean test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 034f5eebca50aa583d2cfe0d4be5dd5c3d25f709

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 034f5eebca50aa583d2cfe0d4be5dd5c3d25f709

@jrose-apple
Copy link
Contributor Author

@swift-ci Please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 034f5eebca50aa583d2cfe0d4be5dd5c3d25f709

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 034f5eebca50aa583d2cfe0d4be5dd5c3d25f709

@jrose-apple
Copy link
Contributor Author

Grr, right, that was the test I didn't update properly.

@jrose-apple
Copy link
Contributor Author

@swift-ci Please clean test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - f1b32e8d328961c26c5c1ad970def19976b65de2

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - f1b32e8d328961c26c5c1ad970def19976b65de2

@jrose-apple jrose-apple force-pushed the prime-directory branch 2 times, most recently from b9d82d9 to 1b9a4df Compare January 17, 2019 23:02
@jrose-apple
Copy link
Contributor Author

@swift-ci Please clean test macOS

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - a2d104cfe001ac932f716171b4cf6c971c6e22f2

@swift-ci
Copy link
Contributor

swift-ci commented Feb 5, 2019

Build failed
Swift Test Linux Platform
Git Sha - 5dd1af156fdb3f160d825e993cdd99b811a205ea

@jrose-apple jrose-apple force-pushed the prime-directory branch 2 times, most recently from 171953b to 1b94055 Compare February 5, 2019 16:49
@jrose-apple
Copy link
Contributor Author

@swift-ci Please test Linux

@jrose-apple
Copy link
Contributor Author

@swift-ci Please smoke test macOS

@swift-ci
Copy link
Contributor

swift-ci commented Feb 5, 2019

Build failed
Swift Test Linux Platform
Git Sha - fe64558bda507dbfa59cd83ee2e5c106f6e2887b

@jrose-apple
Copy link
Contributor Author

@swift-ci Please clean test

@jrose-apple
Copy link
Contributor Author

@swift-ci Please test source compatibility

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - cd4df29848948ba54533b20c0355f904793d0a19

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - cd4df29848948ba54533b20c0355f904793d0a19

@@ -41,7 +41,7 @@ print(", \(glob_b)", terminator: "")
print(", \(glob_s)", terminator: "")
var unused: Int32 = -1

// CHECK-DAG: ![[RT:[0-9]+]] ={{.*}}"{{.*}}Swift.swiftmodule"
// CHECK-DAG: !{{RT:[0-9]+}} = !DIFile({{filename: ".+[.]swiftmodule", directory: ".*Swift[.]swiftmodule"|filename: "Swift[.]swiftmodule", directory: ".*"}})
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops. I missed some square brackets.

@jrose-apple
Copy link
Contributor Author

Debug source compat suite passed
Release source compat suite still going

I need to figure out what was wrong with my fixes for the debug info tests, so building locally. Will try again next week.

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
@jrose-apple
Copy link
Contributor Author

@swift-ci Please clean test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - cd4df29848948ba54533b20c0355f904793d0a19

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - cd4df29848948ba54533b20c0355f904793d0a19

@paulmillr
Copy link

@jrose-apple how would it play with ARMOSX branch?

@jrose-apple
Copy link
Contributor Author

I'm not sure what you're referring to, but I wouldn't expect this to be a problem. The "right" condition is "does your platform support fat dylibs" but right now it's approximating this with "is your platform an Apple platform in one of these lists".

@jrose-apple
Copy link
Contributor Author

@swift-ci Please clean test Linux

@jrose-apple
Copy link
Contributor Author

Here we go. I'll be watching this to make sure it works (and to fix the merge conflicts for Apple-internal folks), but if it's breaking things overnight or tomorrow morning please just revert.

@jrose-apple jrose-apple merged commit 43feb9c into swiftlang:master Feb 19, 2019
@jrose-apple jrose-apple deleted the prime-directory branch February 19, 2019 22:47
beccadax pushed a commit to beccadax/swift that referenced this pull request Mar 1, 2019
…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
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.

5 participants