Skip to content

Conversation

dpaoliello
Copy link
Contributor

  • Update the reference sources (this is in its own commit).
  • Update the Rust sources to match.
  • Bump dependencies to latest.
  • Fix clippy warnings.

WARNINGS:

  • This required making a non-backwards compatible change to the API, so I've bumped the crate version to reflect that.
  • LLVM changed converting normal symbol mangling to Arm64EC mangling to leverage their existing Microsoft Demangler. That is a huge amount of code and relies heavily on class inheritance. So, rather than trying to port it across we'll require that symbols should already be Arm64EC mangled.

@bjorn3
Copy link
Member

bjorn3 commented Jul 26, 2025

Thanks for the PR! I will try to set some time aside next week to review it. If I don't get to it next week, please ping me.

Copy link
Member

@bjorn3 bjorn3 left a comment

Choose a reason for hiding this comment

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

I haven't reviewed the archive writer yet.



; These are Arm64EC mangled names, since we currently don't support converting
; the non-Arm64EC format to Arm64EC. They are taken from ManglerTest.cpp
Copy link
Member

Choose a reason for hiding this comment

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

The .def file could contain the non-arm64ec mangled names, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Correct: we won't be able to handle C++ mangled names that haven't also been Arm64EC mangled. Currently it's broken anyway (the previous heuristic was wrong).

Zalathar added a commit to Zalathar/rust that referenced this pull request Aug 9, 2025
… r=jieyouxu

[win][arm64ec] Partial fix for raw-dylib-link-ordinal on Arm64EC

These are the test fixes required to get `raw-dylib-link-ordinal` working on Arm64EC.

For the test to completely pass, we also need an updated `ar_archive_writer` with <rust-lang/ar_archive_writer#24> merged in.
Zalathar added a commit to Zalathar/rust that referenced this pull request Aug 9, 2025
… r=jieyouxu

[win][arm64ec] Partial fix for raw-dylib-link-ordinal on Arm64EC

These are the test fixes required to get `raw-dylib-link-ordinal` working on Arm64EC.

For the test to completely pass, we also need an updated `ar_archive_writer` with <rust-lang/ar_archive_writer#24> merged in.
…ngling, bump dependencies, fix clippy warnings
Zalathar added a commit to Zalathar/rust that referenced this pull request Aug 10, 2025
… r=jieyouxu

[win][arm64ec] Partial fix for raw-dylib-link-ordinal on Arm64EC

These are the test fixes required to get `raw-dylib-link-ordinal` working on Arm64EC.

For the test to completely pass, we also need an updated `ar_archive_writer` with <rust-lang/ar_archive_writer#24> merged in.
Zalathar added a commit to Zalathar/rust that referenced this pull request Aug 10, 2025
… r=jieyouxu

[win][arm64ec] Partial fix for raw-dylib-link-ordinal on Arm64EC

These are the test fixes required to get `raw-dylib-link-ordinal` working on Arm64EC.

For the test to completely pass, we also need an updated `ar_archive_writer` with <rust-lang/ar_archive_writer#24> merged in.
Zalathar added a commit to Zalathar/rust that referenced this pull request Aug 10, 2025
… r=jieyouxu

[win][arm64ec] Partial fix for raw-dylib-link-ordinal on Arm64EC

These are the test fixes required to get `raw-dylib-link-ordinal` working on Arm64EC.

For the test to completely pass, we also need an updated `ar_archive_writer` with <rust-lang/ar_archive_writer#24> merged in.
Zalathar added a commit to Zalathar/rust that referenced this pull request Aug 10, 2025
… r=jieyouxu

[win][arm64ec] Partial fix for raw-dylib-link-ordinal on Arm64EC

These are the test fixes required to get `raw-dylib-link-ordinal` working on Arm64EC.

For the test to completely pass, we also need an updated `ar_archive_writer` with <rust-lang/ar_archive_writer#24> merged in.
Zalathar added a commit to Zalathar/rust that referenced this pull request Aug 10, 2025
… r=jieyouxu

[win][arm64ec] Partial fix for raw-dylib-link-ordinal on Arm64EC

These are the test fixes required to get `raw-dylib-link-ordinal` working on Arm64EC.

For the test to completely pass, we also need an updated `ar_archive_writer` with <rust-lang/ar_archive_writer#24> merged in.
Zalathar added a commit to Zalathar/rust that referenced this pull request Aug 10, 2025
… r=jieyouxu

[win][arm64ec] Partial fix for raw-dylib-link-ordinal on Arm64EC

These are the test fixes required to get `raw-dylib-link-ordinal` working on Arm64EC.

For the test to completely pass, we also need an updated `ar_archive_writer` with <rust-lang/ar_archive_writer#24> merged in.
rust-timer added a commit to rust-lang/rust that referenced this pull request Aug 10, 2025
Rollup merge of #145112 - dpaoliello:raw-dylib-link-ordinal, r=jieyouxu

[win][arm64ec] Partial fix for raw-dylib-link-ordinal on Arm64EC

These are the test fixes required to get `raw-dylib-link-ordinal` working on Arm64EC.

For the test to completely pass, we also need an updated `ar_archive_writer` with <rust-lang/ar_archive_writer#24> merged in.
@dpaoliello dpaoliello requested a review from bjorn3 August 12, 2025 16:45
@dpaoliello
Copy link
Contributor Author

@bjorn3 ping...

Copy link
Member

@bjorn3 bjorn3 left a comment

Choose a reason for hiding this comment

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

Sorry for the delay.

@bjorn3 bjorn3 merged commit c2e551b into rust-lang:master Aug 21, 2025
2 checks passed
@dpaoliello dpaoliello deleted the llvm20 branch August 21, 2025 16:12
@bjorn3
Copy link
Member

bjorn3 commented Aug 21, 2025

Published v0.5.0.

@dpaoliello
Copy link
Contributor Author

Published v0.5.0.

I'll have a PR out shortly to update rustc to use this version.

bors added a commit to rust-lang/rust that referenced this pull request Sep 1, 2025
Update to ar_archive_writer 0.5

This updates `ar_archive_writer` to 0.5, which in turn was updated to match LLVM 20.1.8: <rust-lang/ar_archive_writer#24>

As part of this, I refactored part of `SymbolWrapper.cpp` to pull common code that I was about to duplicate again into a new function.

NOTE: `ar_archive_writer` does include a breaking change where it no longer supports mangling C++ mangled names for Arm64EC. Since we don't need the mangled name (it's not the "exported name" which we're trying to load from the external dll), I'm setting the `import_name` when building for Arm64EC to prevent error when failing to mangle.

r? `@bjorn3`
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Sep 3, 2025
Update to ar_archive_writer 0.5

This updates `ar_archive_writer` to 0.5, which in turn was updated to match LLVM 20.1.8: <rust-lang/ar_archive_writer#24>

As part of this, I refactored part of `SymbolWrapper.cpp` to pull common code that I was about to duplicate again into a new function.

NOTE: `ar_archive_writer` does include a breaking change where it no longer supports mangling C++ mangled names for Arm64EC. Since we don't need the mangled name (it's not the "exported name" which we're trying to load from the external dll), I'm setting the `import_name` when building for Arm64EC to prevent error when failing to mangle.

r? `@bjorn3`
github-actions bot pushed a commit to rust-lang/compiler-builtins that referenced this pull request Sep 4, 2025
Update to ar_archive_writer 0.5

This updates `ar_archive_writer` to 0.5, which in turn was updated to match LLVM 20.1.8: <rust-lang/ar_archive_writer#24>

As part of this, I refactored part of `SymbolWrapper.cpp` to pull common code that I was about to duplicate again into a new function.

NOTE: `ar_archive_writer` does include a breaking change where it no longer supports mangling C++ mangled names for Arm64EC. Since we don't need the mangled name (it's not the "exported name" which we're trying to load from the external dll), I'm setting the `import_name` when building for Arm64EC to prevent error when failing to mangle.

r? `@bjorn3`
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.

2 participants