Skip to content

PassWrapper: set LibraryOptions in TargetMachine ln LLVM 24+ - #164590

Closed
durin42 wants to merge 1 commit into
rust-lang:mainfrom
durin42:llvm-24-pgo-counter-bias
Closed

durin42 wants to merge 1 commit into
rust-lang:mainfrom
durin42:llvm-24-pgo-counter-bias

Conversation

@durin42

@durin42 durin42 commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

LLVM 24 is cleaning up how LLVM library command line options work, which caused tests/codegen-llvm/pgo-counter-bias.rs to start failing against LLVM HEAD. Previously we were only populating global options for this, and reading that got removed recently.
@rustbot label: +llvm-main

LLVM 24 is cleaning up how LLVM library command line options work, which
caused `tests/codegen-llvm/pgo-counter-bias.rs` to start failing against
LLVM HEAD. Previously we were only populating global options for this,
and reading that got removed recently.
@rustbot rustbot added A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. 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 Oct 19, 2026
@rustbot

rustbot commented Oct 19, 2026

Copy link
Copy Markdown
Collaborator

r? @cuviper

rustbot has assigned @cuviper.
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: @cuviper

@rustbot rustbot added the llvm-main Marks PRs that are making Rust work with LLVM main (this label is consumed by CI tooling) label Oct 19, 2026
static codegen::RegisterCodeGenFlags CGF;

#if LLVM_VERSION_GE(24, 0)
static cl::LibraryOptionsContext LibraryOptions;

@nikic nikic Oct 19, 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.

This global variable should not exist. The whole point of the change is making the options per-context.

View changes since the review

@rust-log-analyzer

Copy link
Copy Markdown
Collaborator

The job test-pr-check-2 failed! Check out the build log: (web) (plain enhanced) (plain)

Click to see the possible cause of the failure (guessed by this bot)

@zmodem

zmodem commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

See also #164591
I guess we should communicate better :-/

@durin42

durin42 commented Oct 19, 2026

Copy link
Copy Markdown
Contributor Author

Yours is better than mine, let's close mine.

@durin42 durin42 closed this Oct 19, 2026
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. llvm-main Marks PRs that are making Rust work with LLVM main (this label is consumed by CI tooling) 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.

6 participants