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

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

Merged
merged 1 commit into from Feb 19, 2019

Conversation

Projects
None yet
5 participants
@jrose-apple
Copy link
Member

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

This comment has been minimized.

Copy link
Member Author

jrose-apple commented Jan 11, 2019

@swift-ci Please clean test

@swift-ci

This comment has been minimized.

Copy link
Contributor

swift-ci commented Jan 11, 2019

Build failed
Swift Test Linux Platform
Git Sha - 43a5da4

@swift-ci

This comment has been minimized.

Copy link
Contributor

swift-ci commented Jan 11, 2019

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

@jrose-apple jrose-apple force-pushed the jrose-apple:prime-directory branch from 43a5da4 to e0437be Jan 14, 2019

@jrose-apple

This comment has been minimized.

Copy link
Member Author

jrose-apple commented Jan 14, 2019

@swift-ci Please clean test

@swift-ci

This comment has been minimized.

Copy link
Contributor

swift-ci commented Jan 14, 2019

Build failed
Swift Test Linux Platform
Git Sha - 43a5da4

@swift-ci

This comment has been minimized.

Copy link
Contributor

swift-ci commented Jan 14, 2019

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

@jrose-apple

This comment has been minimized.

Copy link
Member Author

jrose-apple commented Jan 15, 2019

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

@swift-ci

This comment has been minimized.

Copy link
Contributor

swift-ci commented Jan 15, 2019

Build failed
Swift Test Linux Platform
Git Sha - e0437be

@swift-ci

This comment has been minimized.

Copy link
Contributor

swift-ci commented Jan 15, 2019

Build failed
Swift Test OS X Platform
Git Sha - e0437be

@jrose-apple

This comment has been minimized.

Copy link
Member Author

jrose-apple commented Jan 15, 2019

A little bit further every time…

@jrose-apple jrose-apple force-pushed the jrose-apple:prime-directory branch from e0437be to 034f5ee Jan 15, 2019

@jrose-apple

This comment has been minimized.

Copy link
Member Author

jrose-apple commented Jan 15, 2019

@swift-ci Please clean test

@jrose-apple

This comment has been minimized.

Copy link
Member Author

jrose-apple commented Jan 15, 2019

Oops.

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

@swift-ci

This comment has been minimized.

Copy link
Contributor

swift-ci commented Jan 15, 2019

Build failed
Swift Test Linux Platform
Git Sha - 034f5ee

@swift-ci

This comment has been minimized.

Copy link
Contributor

swift-ci commented Jan 15, 2019

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

@jrose-apple jrose-apple force-pushed the jrose-apple:prime-directory branch from 034f5ee to f1b32e8 Jan 17, 2019

@jrose-apple

This comment has been minimized.

Copy link
Member Author

jrose-apple commented Jan 17, 2019

@swift-ci Please test

@swift-ci

This comment has been minimized.

Copy link
Contributor

swift-ci commented Jan 17, 2019

Build failed
Swift Test Linux Platform
Git Sha - 034f5ee

@swift-ci

This comment has been minimized.

Copy link
Contributor

swift-ci commented Jan 17, 2019

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

@jrose-apple

This comment has been minimized.

Copy link
Member Author

jrose-apple commented Jan 17, 2019

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

@jrose-apple jrose-apple force-pushed the jrose-apple:prime-directory branch from f1b32e8 to a2d104c Jan 17, 2019

@jrose-apple

This comment has been minimized.

Copy link
Member Author

jrose-apple commented Jan 17, 2019

@swift-ci Please clean test

@swift-ci

This comment has been minimized.

Copy link
Contributor

swift-ci commented Jan 17, 2019

Build failed
Swift Test OS X Platform
Git Sha - f1b32e8

@swift-ci

This comment has been minimized.

Copy link
Contributor

swift-ci commented Jan 17, 2019

Build failed
Swift Test Linux Platform
Git Sha - f1b32e8

@jrose-apple jrose-apple force-pushed the jrose-apple:prime-directory branch 2 times, most recently from b9d82d9 to 1b9a4df Jan 17, 2019

@jrose-apple

This comment has been minimized.

Copy link
Member Author

jrose-apple commented Jan 17, 2019

@swift-ci Please clean test macOS

@swift-ci

This comment has been minimized.

Copy link
Contributor

swift-ci commented Jan 17, 2019

Build failed
Swift Test OS X Platform
Git Sha - a2d104c

@swift-ci

This comment has been minimized.

Copy link
Contributor

swift-ci commented Feb 3, 2019

Build failed
Swift Test Linux Platform
Git Sha - b507467

@jrose-apple jrose-apple force-pushed the jrose-apple:prime-directory branch from 5dd1af1 to fe64558 Feb 5, 2019

@jrose-apple

This comment has been minimized.

Copy link
Member Author

jrose-apple commented Feb 5, 2019

@swift-ci Please clean test

@swift-ci

This comment has been minimized.

Copy link
Contributor

swift-ci commented Feb 5, 2019

Build failed
Swift Test OS X Platform
Git Sha - 5dd1af1

@swift-ci

This comment has been minimized.

Copy link
Contributor

swift-ci commented Feb 5, 2019

Build failed
Swift Test Linux Platform
Git Sha - 5dd1af1

@jrose-apple jrose-apple force-pushed the jrose-apple:prime-directory branch 2 times, most recently from 171953b to 1b94055 Feb 5, 2019

@jrose-apple

This comment has been minimized.

Copy link
Member Author

jrose-apple commented Feb 5, 2019

@swift-ci Please test Linux

@jrose-apple

This comment has been minimized.

Copy link
Member Author

jrose-apple commented Feb 5, 2019

@swift-ci Please smoke test macOS

@swift-ci

This comment has been minimized.

Copy link
Contributor

swift-ci commented Feb 5, 2019

Build failed
Swift Test Linux Platform
Git Sha - fe64558

@jrose-apple jrose-apple force-pushed the jrose-apple:prime-directory branch from 1b94055 to cd4df29 Feb 15, 2019

@jrose-apple

This comment has been minimized.

Copy link
Member Author

jrose-apple commented Feb 15, 2019

@swift-ci Please clean test

@jrose-apple

This comment has been minimized.

Copy link
Member Author

jrose-apple commented Feb 15, 2019

@swift-ci Please test source compatibility

@swift-ci

This comment has been minimized.

Copy link
Contributor

swift-ci commented Feb 16, 2019

Build failed
Swift Test Linux Platform
Git Sha - cd4df29

@swift-ci

This comment has been minimized.

Copy link
Contributor

swift-ci commented Feb 16, 2019

Build failed
Swift Test OS X Platform
Git Sha - cd4df29

@@ -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: ".*"}})

This comment has been minimized.

@jrose-apple

jrose-apple Feb 16, 2019

Author Member

Oops. I missed some square brackets.

@jrose-apple jrose-apple force-pushed the jrose-apple:prime-directory branch from cd4df29 to 358f390 Feb 16, 2019

@jrose-apple

This comment has been minimized.

Copy link
Member Author

jrose-apple commented Feb 16, 2019

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.

On Apple platforms, use swiftmodule directories for the stdlib
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 jrose-apple force-pushed the jrose-apple:prime-directory branch from 358f390 to d8f12b5 Feb 16, 2019

@jrose-apple

This comment has been minimized.

Copy link
Member Author

jrose-apple commented Feb 16, 2019

@swift-ci Please clean test

@swift-ci

This comment has been minimized.

Copy link
Contributor

swift-ci commented Feb 16, 2019

Build failed
Swift Test OS X Platform
Git Sha - cd4df29

@swift-ci

This comment has been minimized.

Copy link
Contributor

swift-ci commented Feb 16, 2019

Build failed
Swift Test Linux Platform
Git Sha - cd4df29

@paulmillr

This comment has been minimized.

Copy link

paulmillr commented Feb 19, 2019

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

@jrose-apple

This comment has been minimized.

Copy link
Member Author

jrose-apple commented Feb 19, 2019

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

This comment has been minimized.

Copy link
Member Author

jrose-apple commented Feb 19, 2019

@swift-ci Please clean test Linux

@jrose-apple

This comment has been minimized.

Copy link
Member Author

jrose-apple commented Feb 19, 2019

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 apple:master Feb 19, 2019

4 checks passed

Swift Test Linux Platform No test results found.
Details
Swift Test Linux Platform (smoke test)
Details
Swift Test OS X Platform No test results found.
Details
Swift Test OS X Platform (smoke test)
Details

@jrose-apple jrose-apple deleted the jrose-apple:prime-directory branch Feb 19, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment