-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Force enabling SwiftCompilerSources in the build #73417
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
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We still need to be able to have bootstrapping mode off until we can reliably cross-compile the compiler. Otherwise there is no way to bring up new platforms. (Unless you're okay restricting features to what is available and works with the 5.10 compiler.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is anybody checking that building with bootstrapping off then using that to build a full Swift compiler still works? For example, the regular bootstrapping modes are no longer checked on CI, and have been broken for months on linux.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have been checking. It takes two build-script invocations to get the complete toolchain built. The first stage 0 compiler doesn't have macros or SwiftCompilerSources and it won't pass the test suite. You use that one as the host-tools compiler to bring up a stage 1 compiler with macros and SwiftCompilerSources support. That one will (or should) pass its tests. Finally, I like to do one more stage 2 build with the stage 1 compiler, which compounds issues in either of the other two. Then I run the tests, validation tests, stress tests, and long tests on that stage 2 compiler.
Unfortunately, Swift 6 doesn't build at the moment since there are some unguarded macros in the stdlib, so you can't get through the stage-0 build, but that should be reversible at the moment. You're right though, we really need some level of testing. Either that a stage-0 bootstrapping=off build works, or that we can build the 5.10 compiler, and then build the latest compiler with the 5.10 compiler or we won't be able to bring up Swift on new platforms (at least until we can cross-compile reliably).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have been cross-compiling the Swift compiler to run natively on Android since Swift 5.2, termux/termux-packages#5134, so works fine for me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wait, @eeckstein, if Evan is still using the compiler with bootstrapping off, can't we keep that mode around until his cross-compilation changes are in? I don't use it and I'm all for your first change in this patch of changing the default mode to
HOSTTOOLS
, but why disable being able to turn it off right now?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's still possible to turn if off by not providing a host compiler
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I didn't understand your comment below before, you simply turned it into an undocumented internal option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
exactly