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

Cherry-pick "[M68k] Fix ODR violation in GISel code (#72797)" #159

Merged

Conversation

petrochenkov
Copy link

llvm@8cb8428

To get download-ci-llvm to work sooner (rust-lang/rust#107668).

It prevents LLVM from being linked with LLD at least on Windows, with errors like this:

```
  = note: ld.lld: error: duplicate symbol: vtable for llvm::FormalArgHandler
          >>> defined at librustc_llvm-a81737dd65a7c126.rlib(M68kCallLowering.cpp.obj)
          >>> defined at librustc_llvm-a81737dd65a7c126.rlib(PPCCallLowering.cpp.obj)
```

Binutils linker also complains about this, but only with warnings.

`FormalArgHandler` has a base class `M68kIncomingValueHandler` which doesn't have a virtual method `markPhysRegUsed` like `IncomingValueHandler`s for all other targets including PPC, so it results in a conflict.
The simplest fix is to rename the `FormalArgHandler` structure (rather than to adding virtual methods for compatibility).
@petrochenkov
Copy link
Author

Not sure what is the expected process for such cherry-picking and updating LLVM in rust-lang/rust.

@cuviper
Copy link
Member

cuviper commented Dec 19, 2023

You're within the correct process:
https://rustc-dev-guide.rust-lang.org/backend/updating-llvm.html#bugfix-updates

Next will be a PR with the submodule update in the rust repo.

@cuviper cuviper merged commit 3cb7133 into rust-lang:rustc/17.0-2023-12-14 Dec 19, 2023
petrochenkov added a commit to petrochenkov/rust that referenced this pull request Dec 20, 2023
to pick up "[M68k] Fix ODR violation in GISel code (rust-lang#72797)" rust-lang/llvm-project#159

private:
void assignValueToReg(Register ValVReg, Register PhysReg,
const CCValAssign &VA) override;
Copy link

Choose a reason for hiding this comment

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

This needs to be CCValAssign VA for LLVM 17. This causes the build failure in rust-lang/rust#119159.

Copy link
Author

Choose a reason for hiding this comment

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

Sigh.
Fixed in #160.

petrochenkov added a commit to petrochenkov/rust that referenced this pull request Dec 20, 2023
to pick up "[M68k] Fix ODR violation in GISel code (rust-lang#72797)" rust-lang/llvm-project#159
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Dec 20, 2023
Update LLVM submodule

to pick up "[M68k] Fix ODR violation in GISel code (rust-lang#72797)" rust-lang/llvm-project#159.

Fixes rust-lang#107668
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Dec 20, 2023
Rollup merge of rust-lang#119159 - petrochenkov:llvmup, r=nikic

Update LLVM submodule

to pick up "[M68k] Fix ODR violation in GISel code (rust-lang#72797)" rust-lang/llvm-project#159.

Fixes rust-lang#107668
vext01 pushed a commit to vext01/llvm-project that referenced this pull request May 17, 2024
Reject a bunch of call variants that we haven't considered yet.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants