Skip to content

Temporarily stop emitting the retain attribute to fix the GCC CI - #160474

Closed
antoyo wants to merge 1 commit into
rust-lang:mainfrom
antoyo:fix-gcc-ci
Closed

Temporarily stop emitting the retain attribute to fix the GCC CI#160474
antoyo wants to merge 1 commit into
rust-lang:mainfrom
antoyo:fix-gcc-ci

Conversation

@antoyo

@antoyo antoyo commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@rustbot

rustbot commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

rustc_codegen_gcc is developed in its own repository. If possible, consider making this change to rust-lang/rustc_codegen_gcc instead.

cc @GuillaumeGomez

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Aug 3, 2026
@rustbot

rustbot commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

r? @JonathanBrouwer

rustbot has assigned @JonathanBrouwer.
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: compiler
  • compiler expanded to 75 candidates
  • Random selection from 19 candidates

@rust-bors

rust-bors Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

☔ The latest upstream changes (presumably #160468) made this pull request unmergeable. Please resolve the merge conflicts by rebasing.

@antoyo antoyo closed this Aug 4, 2026
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Aug 4, 2026
pub fn add_retained_global(&mut self, global: LValue<'gcc>) {
// We need to add the `used` C attribute in any case.
self.add_used_global(global);
#[cfg(feature = "master")]

@JonathanBrouwer JonathanBrouwer Aug 4, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

What was this cfg gate for? Could that be related to our ci funkiness?

View changes since the review

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

No, that line is now commented as you can see below.
As discussed on Zulip, it seems the issue is that the machine where GCC is built is using a binutils that is too old, so the retain attributed is effectively disabled.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

What was this cfg gate for?

cg_gcc still supports the old libgccjit version 12 and this cfg gate is needed to say that the following code is only available on the latest libgccjit git version (from our gcc fork).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants