Skip to content
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

[LLVM17] Adapt to ExplicitEmulatedTLS removal. #110755

Merged
merged 1 commit into from
Apr 25, 2023
Merged

Conversation

TimNN
Copy link
Contributor

@TimNN TimNN commented Apr 24, 2023

llvm/llvm-project@0d333bf removed the ExplicitEmulatedTLS field from TargetOptions.

Before that commit, TargetMachine::useEmulatedTLS() fell back to TheTriple.hasDefaultEmulatedTLS() if ExplicitEmulatedTLS was false/unset.

After that commit, TargetMachine::useEmulatedTLS() directly returns Options.EmulatedTLS, and the fallback to TheTriple.hasDefaultEmulatedTLS() was moved to InitTargetOptionsFromCodeGenFlags.

Since rustc does not use InitTargetOptionsFromCodeGenFlags (AFAICT) and instead manually builds TargetOptions, this PR initializes EmulatedTLS to TheTriple.hasDefaultEmulatedTLS().

(I'm not really familiar with the details of what this option does, or if there are any tests that depend on hasDefaultEmulatedTLS being used correctly, so this PR is mostly untested (it does compile against LLVM17, though)).

@rustbot label: +llvm-main

@rustbot
Copy link
Collaborator

rustbot commented Apr 24, 2023

r? @cuviper

(rustbot has picked a reviewer for you, use r? to override)

@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. llvm-main Marks PRs that are making Rust work with LLVM main (this label is consumed by CI tooling) labels Apr 24, 2023
@durin42
Copy link
Contributor

durin42 commented Apr 24, 2023

bors r+

@durin42
Copy link
Contributor

durin42 commented Apr 24, 2023

@bors r+

@bors
Copy link
Contributor

bors commented Apr 24, 2023

📌 Commit 047ed32 has been approved by durin42

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 24, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 25, 2023
…iaskrgr

Rollup of 5 pull requests

Successful merges:

 - rust-lang#110563 (Break up long function in trait selection error reporting + clean up nearby code)
 - rust-lang#110755 ([LLVM17] Adapt to `ExplicitEmulatedTLS` removal.)
 - rust-lang#110775 (Update books)
 - rust-lang#110779 (configure.py: add flag for riscv{64,32}gc musl-root)
 - rust-lang#110782 (Revert panic oom)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 7e143e9 into rust-lang:master Apr 25, 2023
@rustbot rustbot added this to the 1.71.0 milestone Apr 25, 2023
@TimNN TimNN deleted the exp-tls branch May 8, 2023 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
llvm-main Marks PRs that are making Rust work with LLVM main (this label is consumed by CI tooling) S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

5 participants