Skip to content

[5.3][build] Fix --skip-build-llvm so that its minimal targets, like tblgen, are still built #33026

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 2 commits into from
Jul 24, 2020

Conversation

finagolfin
Copy link
Member

The Swift compiler and stdlib builds always need a few LLVM targets like tblgen built, even if skipping building a full LLVM. This was just corrected in the main branch with #32860, backporting to the 5.3 branch so there's no regression for this flag when Swift 5.3 is released. For example, I use this flag when cross-compiling the Swift stdlib for Android, others may be using it too.

Ping @atrick.

@finagolfin finagolfin requested a review from a team as a code owner July 21, 2020 06:54
@atrick
Copy link
Contributor

atrick commented Jul 21, 2020

@swift-ci test

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 63b16b9ac8519f4dfa1cd68e123275f1a6261b13

@airspeedswift
Copy link
Member

Hi @buttaface can you create a Jira for this? We need to track the changes that go onto the release branch.

@DougGregor
Copy link
Member

@swift-ci test macOS

@finagolfin
Copy link
Member Author

@airspeedswift, will do.

@finagolfin
Copy link
Member Author

Reported this issue as SR-13267.

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 63b16b9ac8519f4dfa1cd68e123275f1a6261b13

@atrick
Copy link
Contributor

atrick commented Jul 22, 2020

@swift-ci test macOS

@finagolfin
Copy link
Member Author

Let me know if I need to add the issue number to the commit info or something.

@airspeedswift
Copy link
Member

No need to update the commit. My one question is how do we prevent this regressing again? It’s not the kind of thing you can easily test, but it’s unfortunate that this didn’t get spotted and fixed until this long after we branched, it’d be good if we can avoid that kind of thing systematically.

@finagolfin
Copy link
Member Author

Ahead of you, a test was added for this in the main branch, so it won't happen again. 🎆

@airspeedswift
Copy link
Member

Oh – why wasn’t that included in this PR?

@finagolfin
Copy link
Member Author

That test modified a line from a larger set of tests that was added just last month to the main branch, #32256. I didn't think that would normally be brought back to the release branch, should I add it here?

@gottesmm
Copy link
Contributor

@airspeedswift the test that @buttaface is talking about is a build-system unit test that I added that does FileCheck based build-script dry-runs to make sure build-script doesn't change like this anymore. This specific thing broke before I wrote that test, so I just put into place the behavior at that time until I could find time to get back to fix this.

This is a perfect example of why build-system unit tests are so important and we need more of them.

@gottesmm
Copy link
Contributor

@buttaface Why not just bring over that specific test (validation-test/BuildSystem/skip_cmark_swift_llvm.test). I think it should work just as expected. I would just tweak the command line slightly by replacing --install-all with the relevant individual --install commands. How does that sound?

@finagolfin
Copy link
Member Author

Will do.

# SKIP-CMARK-CHECK: cmake --build {{.*}}swift-

# SKIP-LLVM-CHECK: cmake --build {{.*}}cmark-
# SKIP-LLVM-CHECK: cmake --build {{.*}}llvm-tblgen
Copy link
Member Author

Choose a reason for hiding this comment

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

Updated this pull to bring back this test from the main branch, ready for another CI run.

gottesmm and others added 2 commits July 23, 2020 13:17
… for cmake

This was backported from a313f62 with all the
--infer and --install-all work there left out, bringing back a single test and
the lit variable for cmake that it used.

One note describing that from the original commit:

2. I added %cmake as a lit variable. I did this so I could specify in
   my build-system unit tests that on Linux they should use the just
   built cmake (if we built cmake due to an old cmake being on the
   system). Otherwise, the build system unit tests took way too
   long. These are meant to be dry-runs, so building this cmake again
   is just wasteful and doesn't make sense.
…n, are still built

Backported from commit c969814, resolves SR-13267
@airspeedswift
Copy link
Member

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 63b16b9ac8519f4dfa1cd68e123275f1a6261b13

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 63b16b9ac8519f4dfa1cd68e123275f1a6261b13

@atrick
Copy link
Contributor

atrick commented Jul 24, 2020

@swift-ci test macOS

@atrick atrick merged commit 0ef711a into swiftlang:release/5.3 Jul 24, 2020
@finagolfin finagolfin deleted the skip branch July 24, 2020 22:08
@AnthonyLatsis AnthonyLatsis added swift 5.3 🍒 release cherry pick Flag: Release branch cherry picks labels Jan 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks swift 5.3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants