-
Notifications
You must be signed in to change notification settings - Fork 10.4k
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
[Build] Enable building the early Swift Driver on linux with the prebuilt host toolchain #69564
Conversation
@swift-ci please build toolchain |
Alright, the only platform actually affected by this pull worked, linux. I checked the CI log and it's building and using the early swift driver just fine. MacOS and Windows aren't affected by this pull: the former had a spurious build failure, while the latter's CI appears to be broken right now. @bnbarham, ready for review and merge. |
@swift-ci please build toolchain UBI9 |
@swift-ci please build toolchain CentOS 7 |
@swift-ci please build toolchain Ubuntu 22.04 |
@swift-ci please build toolchain Amazon Linux 2 |
@swift-ci please build toolchain Ubuntu 18.04 |
@swift-ci please test |
Linux CI failed because the early swift driver tests are now being run, maybe for the first time on linux. @artemcm, you added those tests in #36377 a couple years ago, did you ever try them on linux? Natively on Android, I simply disable them with Amazon Linux 2 toolchain build failed at source checkout, unrelated to this pull. |
@swift-ci please build toolchain Amazon Linux 2 |
I'd rather get to the bottom of the failures than just disable them 😅. That really just needs reproducing locally since the tests just all fail with exit code 1 though. |
Both this CI and my native Android toolchain build run the more extensive tests in the swift-driver repo later in the build, so I figured that's enough.
Not all, if you scroll down, there are weird errors like this:
Most likely, it is just the various environment variables not being set right on linux. I figured it was something like that on Android and never looked into it. |
Looked into those failing tests, it appears they are surfacing a genuine discrepancy between the legacy C++ Driver and the new swift-driver. I'm working on a fix. |
00a9bf3
to
b2325f2
Compare
@artemcm, how about a CI run with swiftlang/swift-driver#1479, that should fix most of these tests. |
…x with the prebuilt host toolchain
b2325f2
to
a03f6e5
Compare
Rebased and added a fix for the single failing test, @bnbarham, need another CI run with the linked swift-driver pull. |
@@ -9,7 +9,7 @@ | |||
// CHECK-INITIAL: {{(Job finished: {compile: main.o <= main.swift}|Finished Compiling main.swift)}} | |||
// CHECK-INITIAL: {{(Job finished: {compile: file1.o <= file1.swift}|Finished Compiling file1.swift)}} | |||
// CHECK-INITIAL: {{(Job finished: {compile: file2.o <= file2.swift}|Finished Compiling file2.swift)}} | |||
// CHECK-INITIAL: {{(Job finished: {link: main <= main.o file1.o file2.o}|Finished Linking main)}} | |||
// CHECK-INITIAL: {{(Job finished: {link: main <= main.o file1.o file2.o|Finished Linking main)}} |
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.
This test now passes on linux as part of the early swift driver tests, so I enabled it, but it then failed with the old C++ Driver.
The issue is that these two lines don't expect another autolink file to be added on macOS, but that is needed on linux, which outputs this instead:
Job finished: {link: main <= main.o file1.o file2.o ... 1 more}
Omitting the closing brace here and below should get this test to work on both Mac and linux.
@bnbarham, ready for review and merge, after one last Windows CI run and merge of the linked swift-driver pull, that gets these early swift driver tests to work on linux. |
Oh, this is great. Thank you @finagolfin |
Thanks @finagolfin! I'll do one last toolchain build and then merge :) |
@swift-ci please build toolchain Ubuntu 22.04 |
@bnbarham, let's see if this works on the linux CI now. This simply reverts most of your #68091, with the prebuilt Swift toolchain now installed on the linux CI.