Skip to content

Fix: bootstrap failed when enable both 'llvm'/'gcc' codegen backends#152620

Open
zhanghe9702 wants to merge 1 commit intorust-lang:mainfrom
zhanghe9702:main
Open

Fix: bootstrap failed when enable both 'llvm'/'gcc' codegen backends#152620
zhanghe9702 wants to merge 1 commit intorust-lang:mainfrom
zhanghe9702:main

Conversation

@zhanghe9702
Copy link

No description provided.

@rustbot rustbot added 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) labels Feb 14, 2026
@rustbot
Copy link
Collaborator

rustbot commented Feb 14, 2026

r? @Mark-Simulacrum

rustbot has assigned @Mark-Simulacrum.
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

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: bootstrap
  • bootstrap expanded to 6 candidates
  • Random selection from Mark-Simulacrum, clubby789

@rustbot

This comment has been minimized.

Copy link
Member

@Mark-Simulacrum Mark-Simulacrum left a comment

Choose a reason for hiding this comment

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

Please also write a proper PR description / commit message (not just a link to an issue). That helps future readers and reviewers understand the context of the change (e.g., why you think this is the right change, any references that are useful such as docs from gcc, ...).

View changes since this review

// DESTDIR during the install phase,and the rustc bootstrap process itself
// may also specify DESTDIR to set the toolchain installation path, it is
// necessary to eliminate potential installation path errors for libgccjit.so
// caused by DESTDIR during make install.
Copy link
Member

Choose a reason for hiding this comment

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

IIRC, there are other similar variables that might get set and we should override here (e.g., for docs and such). Is that accurate? Should we strip those as well?

Copy link
Author

Choose a reason for hiding this comment

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

it looks like only DESTDIR would disturb make install , others won't cause panic

Copy link
Member

Choose a reason for hiding this comment

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

Panic doesn't seem like the only concern? Does gcc's make install not respect other related variables? I think it'd be a good idea to remove it from configure and make as well, just in case.

Also, it seems likely that we should have a test for this. I see that we do enable both LLVM and GCC in the CI (src/ci/docker/host-x86_64/x86_64-gnu-gcc/Dockerfile) -- but maybe that's working because there's no DESTDIR that happens to be configured there? Can we add one (should be harmless since it's not a dist build) to continuously verify this works?

I see you haven't updated the PR description as well, as I requested in my last review. Please do that before sending this PR back to me. Thanks!

Copy link
Author

Choose a reason for hiding this comment

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

You're absolutely right. However, since the recommended way to use the GCC backend currently is to compile it separately and then specify the path of libgccjit.so, I’ll look into whether there's a better way to handle this."

@rustbot rustbot 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 Feb 14, 2026
@rustbot
Copy link
Collaborator

rustbot commented Feb 14, 2026

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@zhanghe9702 zhanghe9702 changed the title Fix: #152619 Fix: bootstrap failed when enable both 'llvm'/'gcc' codegen backends Feb 15, 2026
@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Feb 15, 2026
// DESTDIR during the install phase,and the rustc bootstrap process itself
// may also specify DESTDIR to set the toolchain installation path, it is
// necessary to eliminate potential installation path errors for libgccjit.so
// caused by DESTDIR during make install.
Copy link
Member

Choose a reason for hiding this comment

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

Panic doesn't seem like the only concern? Does gcc's make install not respect other related variables? I think it'd be a good idea to remove it from configure and make as well, just in case.

Also, it seems likely that we should have a test for this. I see that we do enable both LLVM and GCC in the CI (src/ci/docker/host-x86_64/x86_64-gnu-gcc/Dockerfile) -- but maybe that's working because there's no DESTDIR that happens to be configured there? Can we add one (should be harmless since it's not a dist build) to continuously verify this works?

I see you haven't updated the PR description as well, as I requested in my last review. Please do that before sending this PR back to me. Thanks!

@rustbot rustbot 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 Feb 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants