Skip to content

{aarch64,x86_64}-*-windows-gnullvm: build host tools #140772

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

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

mati865
Copy link
Member

@mati865 mati865 commented May 7, 2025

This will require MCP, but I suppose we need to know how long it takes to build first.

I opted for bootstrapping from Linux because that's the easiest host system to work with, but once this hits beta, having dedicated Windows runners would be sensible and probably preferable.

--enable-full-tools for whatever reason doesn't seem to work when cross-compiling, because LLVM tools for the new hosts are not copied into the expected directory. And WiX that bootstrap relies upon to create .msi installers only supports Windows. I haven't tried, but it might be usable via Wine.

Almost every commit is self-contained, so let me know if I should split them into separate PRs.

try-job: dist-aarch64-windows-gnullvm
try-job: dist-x86_64-windows-gnullvm

@rustbot
Copy link
Collaborator

rustbot commented May 7, 2025

r? @marcoieni

rustbot has assigned @marcoieni.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added A-testsuite Area: The testsuite used to check the correctness of rustc S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels May 7, 2025
@rustbot
Copy link
Collaborator

rustbot commented May 7, 2025

This PR changes how LLVM is built. Consider updating src/bootstrap/download-ci-llvm-stamp.

@mati865
Copy link
Member Author

mati865 commented May 11, 2025

Forgot to include try-job. Fixed it.

@marcoieni
Copy link
Member

This will require MCP, but I suppose we need to know how long it takes to build first.

ok, so I guess we need to try this, right?

@bors try

bors added a commit to rust-lang-ci/rust that referenced this pull request May 15, 2025
{aarch64,x86_64}-*-windows-gnullvm: build host tools

This will require MCP, but I suppose we need to know how long it takes to build first.

I opted for bootstrapping from Linux because that's the easiest host system to work with, but once this hits beta, having dedicated Windows runners would be sensible and probably preferable.

`--enable-full-tools` for whatever reason doesn't seem to work when cross-compiling, because LLVM tools for the new hosts are not copied into the expected directory. And WiX that bootstrap relies upon to create .msi installers only supports Windows. I haven't tried, but it might be usable via Wine.

Almost every commit is self-contained, so let me know if I should split them into separate PRs.

try-job: dist-windows-gnullvm
@bors
Copy link
Collaborator

bors commented May 15, 2025

⌛ Trying commit d0b81ca with merge 9772d67...

@rust-log-analyzer

This comment has been minimized.

@marcoieni
Copy link
Member

maybe you need to add the job to the src/ci/github-actions/jobs.yml file?

@bors
Copy link
Collaborator

bors commented May 15, 2025

💥 Test timed out

@mati865
Copy link
Member Author

mati865 commented May 15, 2025

Oh, right. Totally forgot about it.

@marcoieni
Copy link
Member

@bors try

@bors
Copy link
Collaborator

bors commented May 16, 2025

⌛ Trying commit b256449 with merge 34c404a...

bors added a commit to rust-lang-ci/rust that referenced this pull request May 16, 2025
{aarch64,x86_64}-*-windows-gnullvm: build host tools

This will require MCP, but I suppose we need to know how long it takes to build first.

I opted for bootstrapping from Linux because that's the easiest host system to work with, but once this hits beta, having dedicated Windows runners would be sensible and probably preferable.

`--enable-full-tools` for whatever reason doesn't seem to work when cross-compiling, because LLVM tools for the new hosts are not copied into the expected directory. And WiX that bootstrap relies upon to create .msi installers only supports Windows. I haven't tried, but it might be usable via Wine.

Almost every commit is self-contained, so let me know if I should split them into separate PRs.

try-job: dist-windows-gnullvm
@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Collaborator

bors commented May 16, 2025

💔 Test failed - checks-actions

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 16, 2025
@mati865
Copy link
Member Author

mati865 commented May 16, 2025

System.IO.IOException: No space left on device

Unfortunately, free CI runners are not as capable as I had hoped. I've split the jobs now, but dunno if this will be acceptable.

@marcoieni
Copy link
Member

I've split the jobs now, but dunno if this will be acceptable.

yes, we prefer multiple free runner compared to 1 large runner 👍

@bors try

bors added a commit to rust-lang-ci/rust that referenced this pull request May 19, 2025
{aarch64,x86_64}-*-windows-gnullvm: build host tools

This will require MCP, but I suppose we need to know how long it takes to build first.

I opted for bootstrapping from Linux because that's the easiest host system to work with, but once this hits beta, having dedicated Windows runners would be sensible and probably preferable.

`--enable-full-tools` for whatever reason doesn't seem to work when cross-compiling, because LLVM tools for the new hosts are not copied into the expected directory. And WiX that bootstrap relies upon to create .msi installers only supports Windows. I haven't tried, but it might be usable via Wine.

Almost every commit is self-contained, so let me know if I should split them into separate PRs.

try-job: dist-aarch64-windows-gnullvm
try-job: dist-x86_64-windows-gnullvm
@bors
Copy link
Collaborator

bors commented May 19, 2025

⌛ Trying commit a84e84e with merge 9e708f5...

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Collaborator

bors commented May 19, 2025

💔 Test failed - checks-actions

@marcoieni
Copy link
Member

@bors try

workingjubilee added a commit to workingjubilee/rustc that referenced this pull request Jun 3, 2025
…-compiling, r=cuviper

rustc_llvm: add Windows system libs only when cross-compiling from Wi…

…ndows

This obviously doesn't work when cross-compiling from Linux.

Split out from: rust-lang#140772

Fixes the issue described at [#general > Problems while trying to cross compile rustc for windows](https://rust-lang.zulipchat.com/#narrow/channel/122651-general/topic/Problems.20while.20trying.20to.20cross.20compile.20rustc.20for.20windows/with/520508561)
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Jun 3, 2025
…-compiling, r=cuviper

rustc_llvm: add Windows system libs only when cross-compiling from Wi…

…ndows

This obviously doesn't work when cross-compiling from Linux.

Split out from: rust-lang#140772

Fixes the issue described at [#general > Problems while trying to cross compile rustc for windows](https://rust-lang.zulipchat.com/#narrow/channel/122651-general/topic/Problems.20while.20trying.20to.20cross.20compile.20rustc.20for.20windows/with/520508561)
rust-timer added a commit that referenced this pull request Jun 3, 2025
Rollup merge of #141817 - mati865:fix-system-libs-when-cross-compiling, r=cuviper

rustc_llvm: add Windows system libs only when cross-compiling from Wi…

…ndows

This obviously doesn't work when cross-compiling from Linux.

Split out from: #140772

Fixes the issue described at [#general > Problems while trying to cross compile rustc for windows](https://rust-lang.zulipchat.com/#narrow/channel/122651-general/topic/Problems.20while.20trying.20to.20cross.20compile.20rustc.20for.20windows/with/520508561)
Kivooeo pushed a commit to Kivooeo/rust that referenced this pull request Jun 3, 2025
…ndows

This obviously doesn't work when cross-compiling from Linux.

Split out from: rust-lang#140772
@mati865 mati865 force-pushed the gnullvm-host branch 3 times, most recently from 9275937 to 13bfa7c Compare June 9, 2025 21:46
fmease added a commit to fmease/rust that referenced this pull request Jun 10, 2025
…indows, r=Kobzol

Don't create .msi installer for gnullvm hosts

WIX toolset works only on Windows hosts, but gnullvm doesn't have host toolchain yet. To get out of this loop, we will create a single release without MSI installer.

Split out from: rust-lang#140772
rust-timer added a commit that referenced this pull request Jun 10, 2025
Rollup merge of #141818 - mati865:dont-create-msi-from-non-windows, r=Kobzol

Don't create .msi installer for gnullvm hosts

WIX toolset works only on Windows hosts, but gnullvm doesn't have host toolchain yet. To get out of this loop, we will create a single release without MSI installer.

Split out from: #140772
@mati865 mati865 marked this pull request as ready for review June 11, 2025 23:12
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 11, 2025
@mati865
Copy link
Member Author

mati865 commented Jun 11, 2025

@rustbot ready

All the changes not related to the jobs themselves are merged now (via separate PRs), so this should be good to go. I have added update llvm-mingw commit since the last time. I'll squash it when it's approved.

@mati865 mati865 removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) A-testsuite Area: The testsuite used to check the correctness of rustc labels Jun 11, 2025
@marcoieni
Copy link
Member

marcoieni commented Jun 12, 2025

but once this hits beta, having dedicated Windows runners would be sensible and probably preferable.

mmh so you are saying that in a few weeks you are going to open a new PR to edit this code? Why not edit it now? 🤔

@@ -237,6 +237,12 @@ auto:
- name: dist-s390x-linux
<<: *job-linux-4c

- name: dist-aarch64-windows-gnullvm
<<: *job-linux-4c
Copy link
Member

Choose a reason for hiding this comment

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

why not using the free arm runner instead of the x86 one?

# despite no such directory existing:
# ❯ ls obj/dist-windows-gnullvm/build/aarch64-pc-windows-gnullvm/ -1
#  llvm
#  stage2
Copy link
Member

Choose a reason for hiding this comment

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

what character is this?
image

--set llvm.download-ci-llvm=false \
--set rust.llvm-tools=false
# LLVM cross tools are not installed into expected location so copying fails.
# Probably will solve itself when building from Windows.
Copy link
Member

Choose a reason for hiding this comment

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

same question asked before. Why don't we build from windows now? Is it for the time required to change this PR and we want to ship this earlier? 🤔

# We are bootstrapping this target and cannot use previously built artifacts.
# Without this option Clang is given `"-I/checkout/obj/build/aarch64-pc-windows-gnullvm/ci-llvm/include"`
# despite no such directory existing:
# ❯ ls obj/dist-windows-gnullvm/build/aarch64-pc-windows-gnullvm/ -1
Copy link
Member

Choose a reason for hiding this comment

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

Maybe it's more familiar to use $ instead of to indicate a prompt.

Comment on lines +33 to +35
# ❯ ls obj/dist-windows-gnullvm/build/aarch64-pc-windows-gnullvm/ -1
#  llvm
#  stage2
Copy link
Member

Choose a reason for hiding this comment

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

same comments as above

Copy link
Member

Choose a reason for hiding this comment

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

this file is very similar to [dist-aarch64-windows-gnullvm/install-llvm-mingw.sh](https://github.com/rust-lang/rust/pull/140772/files#diff-aa3918ad02d118bc5907a7d19827d8b3de442f35cde1b590b60261dee2852c07).

Can we share the logic somehow?

@marcoieni
Copy link
Member

@bors2 try

@rust-bors
Copy link

rust-bors bot commented Jun 12, 2025

⌛ Trying commit cacda77 with merge e70386e

To cancel the try build, run the command @bors2 try cancel.

rust-bors bot added a commit that referenced this pull request Jun 12, 2025
{aarch64,x86_64}-*-windows-gnullvm: build host tools

This will require MCP, but I suppose we need to know how long it takes to build first.

I opted for bootstrapping from Linux because that's the easiest host system to work with, but once this hits beta, having dedicated Windows runners would be sensible and probably preferable.

`--enable-full-tools` for whatever reason doesn't seem to work when cross-compiling, because LLVM tools for the new hosts are not copied into the expected directory. And WiX that bootstrap relies upon to create .msi installers only supports Windows. I haven't tried, but it might be usable via Wine.

Almost every commit is self-contained, so let me know if I should split them into separate PRs.

try-job: dist-aarch64-windows-gnullvm
try-job: dist-x86_64-windows-gnullvm
@rust-bors
Copy link

rust-bors bot commented Jun 12, 2025

☀️ Try build successful (CI)
Build commit: e70386e (e70386ee53406b709646411f6d6f6ddd471514ef, parent: fe5c95d4ae33ec9d7831921e448e2daf8264ea42)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants