Skip to content

Add a 'standalone_minimal' preset to build a minimal, static, OS independent, self-contained binaries of stdlib. #33286

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 17 commits into from
Aug 12, 2020

Conversation

kubamracek
Copy link
Contributor

@kubamracek kubamracek commented Aug 4, 2020

This PR is the first step to be able to produce a new variant of the Swift Runtime and Standard Library — a minimal, static, self-contained build that is not tied to a particular operation system.

The building pieces are:

  • A new "freestanding" platform, which doesn't imply any particular OS.
  • A "min-size-release" build-script mode, which optimizes for size.
  • Some CMake options that allow specifying how to actually build the stdlib (which SDK, archs, and target triple to use).
  • A new preset that builds a "freestanding-x86_64" stdlib in this mode.

(Note that this is strictly for the runtime/stdlib, not for the compiler.)

Copy link
Contributor

@gottesmm gottesmm left a comment

Choose a reason for hiding this comment

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

Some thoughts/questions/etc.

@kubamracek kubamracek changed the title Add a 'standalone_minimal' preset to build a minimal, static, self-contained binaries of stdlib. Add a 'standalone_minimal' preset to build a minimal, static, OS-independent, self-contained binaries of stdlib. Aug 5, 2020
@kubamracek
Copy link
Contributor Author

@swift-ci please test

@swift-ci
Copy link
Contributor

swift-ci commented Aug 5, 2020

Build failed
Swift Test OS X Platform
Git Sha - d3cdc7de5f1b0d35b7d4253840f763825dc888a1

@swift-ci
Copy link
Contributor

swift-ci commented Aug 5, 2020

Build failed
Swift Test Linux Platform
Git Sha - d3cdc7de5f1b0d35b7d4253840f763825dc888a1

@kubamracek
Copy link
Contributor Author

@swift-ci please test

@swift-ci
Copy link
Contributor

swift-ci commented Aug 6, 2020

Build failed
Swift Test OS X Platform
Git Sha - d3cdc7de5f1b0d35b7d4253840f763825dc888a1

@swift-ci
Copy link
Contributor

swift-ci commented Aug 6, 2020

Build failed
Swift Test Linux Platform
Git Sha - d3cdc7de5f1b0d35b7d4253840f763825dc888a1

@kubamracek
Copy link
Contributor Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 3168f9d856550cbce3d5d55a3da1a210849f4a3a

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 3168f9d856550cbce3d5d55a3da1a210849f4a3a

@kubamracek kubamracek changed the title Add a 'standalone_minimal' preset to build a minimal, static, OS-independent, self-contained binaries of stdlib. Add a 'standalone_minimal' preset to build a minimal, static, OS independent, self-contained binaries of stdlib. Aug 10, 2020
@kubamracek
Copy link
Contributor Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - ecff7ce73dbab6a3e63eeec2fba98cc42659f000

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - ecff7ce73dbab6a3e63eeec2fba98cc42659f000

@kubamracek kubamracek force-pushed the add-generic-stdlib-variant branch from 8009391 to e52a7b3 Compare August 11, 2020 20:58
@kubamracek
Copy link
Contributor Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 8009391c5065be9c2b06cc30fecb17890cf1dfdb

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 8009391c5065be9c2b06cc30fecb17890cf1dfdb

@kubamracek
Copy link
Contributor Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - e52a7b3

@kubamracek
Copy link
Contributor Author

@swift-ci please test macOS platform

@kubamracek kubamracek merged commit ef89b0d into swiftlang:master Aug 12, 2020
@kubamracek kubamracek deleted the add-generic-stdlib-variant branch August 12, 2020 14:28
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.

4 participants