Skip to content

export symbols: support macos/windows(32/64)#155535

Merged
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
cezarbbb:cstyle-export-symbols
Jun 25, 2026
Merged

export symbols: support macos/windows(32/64)#155535
rust-bors[bot] merged 1 commit into
rust-lang:mainfrom
cezarbbb:cstyle-export-symbols

Conversation

@cezarbbb

@cezarbbb cezarbbb commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

View all comments

Previously, in the pr #150992 , export symbols only supported Linux. The special prefix and suffix rules for some symbols in macOS and Windows were not fully supported. This pull request attempts to clarify these rules and add corresponding support.

Currently, the undecorate_c_symbol() function has been added to handle macOS _ prefixes, Windows x86 calling convention modifiers (cdecl/stdcall/fastcall/vectorcall), and Arm64EC # prefixes.

*Update: Handling of Windows C++ mangled symbols has now been added(Linux/macOS don't need).

r? @bjorn3 @petrochenkov

@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs 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 Apr 20, 2026
@rustbot

rustbot commented Apr 20, 2026

Copy link
Copy Markdown
Collaborator

r? @wesleywiser

rustbot has assigned @wesleywiser.
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: codegen, compiler
  • codegen, compiler expanded to 72 candidates
  • Random selection from 16 candidates

@rustbot rustbot assigned bjorn3 and unassigned wesleywiser Apr 20, 2026
@cezarbbb

Copy link
Copy Markdown
Contributor Author

Could someone pls give me permission to test whether the current modifications will work correctly on Windows and macOS?
Cause I don't have the corresponding devices.

@adwinwhite

Copy link
Copy Markdown
Contributor

@bors delegate=try

@rust-bors

rust-bors Bot commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

✌️ @cezarbbb, you can now perform try builds on this pull request!

You can now post @bors try to start a try build.

@cezarbbb

Copy link
Copy Markdown
Contributor Author

@bors delegate=try

Thanks!!! It helps me a lot:>

@cezarbbb

Copy link
Copy Markdown
Contributor Author

@bors try jobs=x86_64-msvc-*

rust-bors Bot pushed a commit that referenced this pull request Apr 20, 2026
export symbols: support macos/windows(32/64)


try-job: x86_64-msvc-*
@rust-bors

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-bors rust-bors Bot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 20, 2026
@rust-bors

rust-bors Bot commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 22e628f failed: CI. Failed job:

@cezarbbb

Copy link
Copy Markdown
Contributor Author

@bors try jobs=x86_64-msvc-*

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Apr 20, 2026
export symbols: support macos/windows(32/64)


try-job: x86_64-msvc-*
@rust-bors

rust-bors Bot commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 71d836c failed: CI. Failed job:

@rust-log-analyzer

This comment has been minimized.

@cezarbbb

Copy link
Copy Markdown
Contributor Author

@bors try jobs=x86_64-msvc-*

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Apr 20, 2026
export symbols: support macos/windows(32/64)


try-job: x86_64-msvc-*
@rust-bors

rust-bors Bot commented Apr 20, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: 6d8d88e (6d8d88e3ab7025c82dc5ed03d96874614fdf1189, parent: e22c616e4e87914135c1db261a03e0437255335e)

@cezarbbb

Copy link
Copy Markdown
Contributor Author

@bors try jobs=aarch64-*

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Apr 20, 2026
export symbols: support macos/windows(32/64)


try-job: aarch64-*
@rustbot

rustbot commented Jun 17, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@cezarbbb

Copy link
Copy Markdown
Contributor Author

This time's force push only resolves the conflict. Call try jobs again is just in case.
@bors try jobs=x86_64-msvc*

@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jun 17, 2026
export symbols: support macos/windows(32/64)


try-job: x86_64-msvc*
@rust-bors

rust-bors Bot commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

☀️ Try build successful (CI)
Build commit: b9ef0af (b9ef0af7c6d37ff653a63921679884f6161be8a6)
Base parent: 98594f4 (98594f404ee741f97fefbae4aca049cde911bc94)

@bjorn3

bjorn3 commented Jun 24, 2026

Copy link
Copy Markdown
Member

@bors r+

@rust-bors

rust-bors Bot commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

📌 Commit ca10995 has been approved by bjorn3

It is now in the queue for this repository.

@rust-bors rust-bors Bot 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 Jun 24, 2026
rust-bors Bot pushed a commit that referenced this pull request Jun 25, 2026
…uwer

Rollup of 17 pull requests

Successful merges:

 - #153697 (Add arg splat experiment initial tuple impl)
 - #158294 (Use .drectve for MSVC DLL exports)
 - #158253 (codegen_ssa: multiply scalable vec size by `vscale`)
 - #158308 (Fix bug when rustdoc "go to only result" setting is not working as expected")
 - #158345 (Use `transmute_neo` in `assume_init`)
 - #158369 (std: abort when `resume_unwind` is called inside the panic hook)
 - #158374 (disallow tail calling extern "rust-call" functions)
 - #158380 (Revert "rebuild LLVM when `bootstrap.toml` config changes")
 - #154398 (Add test for async Send with PhantomData<*mut ()> + unsafe impl Send + dyn Trait)
 - #157181 (autodiff: stop always needing an alloca)
 - #158278 (autodiff - typtree cleanups)
 - #158311 (doc(unstable-book): fix typo "earier" -> "earlier" in default-visibility flag)
 - #158318 (Make normalization in a test case resilient to dist compilation)
 - #158338 (Reorganize `tests/ui/issues` [14/N])
 - #158343 (Include `Item::const_stability` info in rustdoc JSON.)
 - #158355 (Fixup the refactoring errors in #156246)
 - #158390 (Fix: auto trait, const trait bound)

Failed merges:

 - #155535 (export symbols: support macos/windows(32/64))
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jun 25, 2026
…bjorn3

export symbols: support macos/windows(32/64)

Previously, in the pr rust-lang#150992 , export symbols only supported Linux. The special prefix and suffix rules for some symbols in macOS and Windows were not fully supported. This pull request attempts to clarify these rules and add corresponding support.

Currently, the `undecorate_c_symbol()` function has been added to handle macOS `_` prefixes, Windows x86 calling convention modifiers (cdecl/stdcall/fastcall/vectorcall), and Arm64EC `#` prefixes.

*Update: Handling of Windows C++ mangled symbols has now been added(Linux/macOS don't need).

r? @bjorn3 @petrochenkov
rust-bors Bot pushed a commit that referenced this pull request Jun 25, 2026
…uwer

Rollup of 17 pull requests

Successful merges:

 - #153697 (Add arg splat experiment initial tuple impl)
 - #155535 (export symbols: support macos/windows(32/64))
 - #158253 (codegen_ssa: multiply scalable vec size by `vscale`)
 - #158308 (Fix bug when rustdoc "go to only result" setting is not working as expected")
 - #158345 (Use `transmute_neo` in `assume_init`)
 - #158369 (std: abort when `resume_unwind` is called inside the panic hook)
 - #158374 (disallow tail calling extern "rust-call" functions)
 - #158380 (Revert "rebuild LLVM when `bootstrap.toml` config changes")
 - #154398 (Add test for async Send with PhantomData<*mut ()> + unsafe impl Send + dyn Trait)
 - #157181 (autodiff: stop always needing an alloca)
 - #158278 (autodiff - typtree cleanups)
 - #158311 (doc(unstable-book): fix typo "earier" -> "earlier" in default-visibility flag)
 - #158318 (Make normalization in a test case resilient to dist compilation)
 - #158338 (Reorganize `tests/ui/issues` [14/N])
 - #158343 (Include `Item::const_stability` info in rustdoc JSON.)
 - #158355 (Fixup the refactoring errors in #156246)
 - #158390 (Fix: auto trait, const trait bound)
rust-bors Bot pushed a commit that referenced this pull request Jun 25, 2026
…uwer

Rollup of 17 pull requests

Successful merges:

 - #153697 (Add arg splat experiment initial tuple impl)
 - #155535 (export symbols: support macos/windows(32/64))
 - #158253 (codegen_ssa: multiply scalable vec size by `vscale`)
 - #158308 (Fix bug when rustdoc "go to only result" setting is not working as expected")
 - #158345 (Use `transmute_neo` in `assume_init`)
 - #158369 (std: abort when `resume_unwind` is called inside the panic hook)
 - #158374 (disallow tail calling extern "rust-call" functions)
 - #158380 (Revert "rebuild LLVM when `bootstrap.toml` config changes")
 - #154398 (Add test for async Send with PhantomData<*mut ()> + unsafe impl Send + dyn Trait)
 - #157181 (autodiff: stop always needing an alloca)
 - #158278 (autodiff - typtree cleanups)
 - #158311 (doc(unstable-book): fix typo "earier" -> "earlier" in default-visibility flag)
 - #158318 (Make normalization in a test case resilient to dist compilation)
 - #158338 (Reorganize `tests/ui/issues` [14/N])
 - #158343 (Include `Item::const_stability` info in rustdoc JSON.)
 - #158355 (Fixup the refactoring errors in #156246)
 - #158390 (Fix: auto trait, const trait bound)
rust-bors Bot pushed a commit that referenced this pull request Jun 25, 2026
…uwer

Rollup of 17 pull requests

Successful merges:

 - #153697 (Add arg splat experiment initial tuple impl)
 - #155535 (export symbols: support macos/windows(32/64))
 - #158253 (codegen_ssa: multiply scalable vec size by `vscale`)
 - #158308 (Fix bug when rustdoc "go to only result" setting is not working as expected")
 - #158345 (Use `transmute_neo` in `assume_init`)
 - #158369 (std: abort when `resume_unwind` is called inside the panic hook)
 - #158374 (disallow tail calling extern "rust-call" functions)
 - #158380 (Revert "rebuild LLVM when `bootstrap.toml` config changes")
 - #154398 (Add test for async Send with PhantomData<*mut ()> + unsafe impl Send + dyn Trait)
 - #157181 (autodiff: stop always needing an alloca)
 - #158278 (autodiff - typtree cleanups)
 - #158311 (doc(unstable-book): fix typo "earier" -> "earlier" in default-visibility flag)
 - #158318 (Make normalization in a test case resilient to dist compilation)
 - #158338 (Reorganize `tests/ui/issues` [14/N])
 - #158343 (Include `Item::const_stability` info in rustdoc JSON.)
 - #158355 (Fixup the refactoring errors in #156246)
 - #158390 (Fix: auto trait, const trait bound)
JonathanBrouwer added a commit to JonathanBrouwer/rust that referenced this pull request Jun 25, 2026
…bjorn3

export symbols: support macos/windows(32/64)

Previously, in the pr rust-lang#150992 , export symbols only supported Linux. The special prefix and suffix rules for some symbols in macOS and Windows were not fully supported. This pull request attempts to clarify these rules and add corresponding support.

Currently, the `undecorate_c_symbol()` function has been added to handle macOS `_` prefixes, Windows x86 calling convention modifiers (cdecl/stdcall/fastcall/vectorcall), and Arm64EC `#` prefixes.

*Update: Handling of Windows C++ mangled symbols has now been added(Linux/macOS don't need).

r? @bjorn3 @petrochenkov
rust-bors Bot pushed a commit that referenced this pull request Jun 25, 2026
…uwer

Rollup of 16 pull requests

Successful merges:

 - #153697 (Add arg splat experiment initial tuple impl)
 - #155535 (export symbols: support macos/windows(32/64))
 - #158253 (codegen_ssa: multiply scalable vec size by `vscale`)
 - #158308 (Fix bug when rustdoc "go to only result" setting is not working as expected")
 - #158345 (Use `transmute_neo` in `assume_init`)
 - #158369 (std: abort when `resume_unwind` is called inside the panic hook)
 - #158374 (disallow tail calling extern "rust-call" functions)
 - #158380 (Revert "rebuild LLVM when `bootstrap.toml` config changes")
 - #154398 (Add test for async Send with PhantomData<*mut ()> + unsafe impl Send + dyn Trait)
 - #157181 (autodiff: stop always needing an alloca)
 - #158278 (autodiff - typtree cleanups)
 - #158311 (doc(unstable-book): fix typo "earier" -> "earlier" in default-visibility flag)
 - #158318 (Make normalization in a test case resilient to dist compilation)
 - #158338 (Reorganize `tests/ui/issues` [14/N])
 - #158343 (Include `Item::const_stability` info in rustdoc JSON.)
 - #158390 (Fix: auto trait, const trait bound)

Failed merges:

 - #158355 (Fixup the refactoring errors in #156246)
rust-bors Bot pushed a commit that referenced this pull request Jun 25, 2026
…uwer

Rollup of 15 pull requests

Successful merges:

 - #155535 (export symbols: support macos/windows(32/64))
 - #158253 (codegen_ssa: multiply scalable vec size by `vscale`)
 - #158308 (Fix bug when rustdoc "go to only result" setting is not working as expected")
 - #158345 (Use `transmute_neo` in `assume_init`)
 - #158369 (std: abort when `resume_unwind` is called inside the panic hook)
 - #158374 (disallow tail calling extern "rust-call" functions)
 - #158380 (Revert "rebuild LLVM when `bootstrap.toml` config changes")
 - #154398 (Add test for async Send with PhantomData<*mut ()> + unsafe impl Send + dyn Trait)
 - #157181 (autodiff: stop always needing an alloca)
 - #158278 (autodiff - typtree cleanups)
 - #158311 (doc(unstable-book): fix typo "earier" -> "earlier" in default-visibility flag)
 - #158318 (Make normalization in a test case resilient to dist compilation)
 - #158338 (Reorganize `tests/ui/issues` [14/N])
 - #158343 (Include `Item::const_stability` info in rustdoc JSON.)
 - #158390 (Fix: auto trait, const trait bound)
rust-bors Bot pushed a commit that referenced this pull request Jun 25, 2026
…uwer

Rollup of 15 pull requests

Successful merges:

 - #155535 (export symbols: support macos/windows(32/64))
 - #158253 (codegen_ssa: multiply scalable vec size by `vscale`)
 - #158308 (Fix bug when rustdoc "go to only result" setting is not working as expected")
 - #158345 (Use `transmute_neo` in `assume_init`)
 - #158369 (std: abort when `resume_unwind` is called inside the panic hook)
 - #158374 (disallow tail calling extern "rust-call" functions)
 - #158380 (Revert "rebuild LLVM when `bootstrap.toml` config changes")
 - #154398 (Add test for async Send with PhantomData<*mut ()> + unsafe impl Send + dyn Trait)
 - #157181 (autodiff: stop always needing an alloca)
 - #158278 (autodiff - typtree cleanups)
 - #158311 (doc(unstable-book): fix typo "earier" -> "earlier" in default-visibility flag)
 - #158318 (Make normalization in a test case resilient to dist compilation)
 - #158338 (Reorganize `tests/ui/issues` [14/N])
 - #158343 (Include `Item::const_stability` info in rustdoc JSON.)
 - #158390 (Fix: auto trait, const trait bound)
rust-bors Bot pushed a commit that referenced this pull request Jun 25, 2026
…uwer

Rollup of 15 pull requests

Successful merges:

 - #155535 (export symbols: support macos/windows(32/64))
 - #158253 (codegen_ssa: multiply scalable vec size by `vscale`)
 - #158308 (Fix bug when rustdoc "go to only result" setting is not working as expected")
 - #158345 (Use `transmute_neo` in `assume_init`)
 - #158369 (std: abort when `resume_unwind` is called inside the panic hook)
 - #158374 (disallow tail calling extern "rust-call" functions)
 - #158380 (Revert "rebuild LLVM when `bootstrap.toml` config changes")
 - #154398 (Add test for async Send with PhantomData<*mut ()> + unsafe impl Send + dyn Trait)
 - #157181 (autodiff: stop always needing an alloca)
 - #158278 (autodiff - typtree cleanups)
 - #158311 (doc(unstable-book): fix typo "earier" -> "earlier" in default-visibility flag)
 - #158318 (Make normalization in a test case resilient to dist compilation)
 - #158338 (Reorganize `tests/ui/issues` [14/N])
 - #158343 (Include `Item::const_stability` info in rustdoc JSON.)
 - #158390 (Fix: auto trait, const trait bound)
rust-bors Bot pushed a commit that referenced this pull request Jun 25, 2026
…uwer

Rollup of 15 pull requests

Successful merges:

 - #155535 (export symbols: support macos/windows(32/64))
 - #158253 (codegen_ssa: multiply scalable vec size by `vscale`)
 - #158308 (Fix bug when rustdoc "go to only result" setting is not working as expected")
 - #158345 (Use `transmute_neo` in `assume_init`)
 - #158369 (std: abort when `resume_unwind` is called inside the panic hook)
 - #158374 (disallow tail calling extern "rust-call" functions)
 - #158380 (Revert "rebuild LLVM when `bootstrap.toml` config changes")
 - #154398 (Add test for async Send with PhantomData<*mut ()> + unsafe impl Send + dyn Trait)
 - #157181 (autodiff: stop always needing an alloca)
 - #158278 (autodiff - typtree cleanups)
 - #158311 (doc(unstable-book): fix typo "earier" -> "earlier" in default-visibility flag)
 - #158318 (Make normalization in a test case resilient to dist compilation)
 - #158338 (Reorganize `tests/ui/issues` [14/N])
 - #158343 (Include `Item::const_stability` info in rustdoc JSON.)
 - #158390 (Fix: auto trait, const trait bound)
@rust-bors rust-bors Bot merged commit 749740f into rust-lang:main Jun 25, 2026
14 checks passed
@rustbot rustbot added this to the 1.98.0 milestone Jun 25, 2026
rust-timer added a commit that referenced this pull request Jun 25, 2026
Rollup merge of #155535 - cezarbbb:cstyle-export-symbols, r=bjorn3

export symbols: support macos/windows(32/64)

Previously, in the pr #150992 , export symbols only supported Linux. The special prefix and suffix rules for some symbols in macOS and Windows were not fully supported. This pull request attempts to clarify these rules and add corresponding support.

Currently, the `undecorate_c_symbol()` function has been added to handle macOS `_` prefixes, Windows x86 calling convention modifiers (cdecl/stdcall/fastcall/vectorcall), and Arm64EC `#` prefixes.

*Update: Handling of Windows C++ mangled symbols has now been added(Linux/macOS don't need).

r? @bjorn3 @petrochenkov
@cezarbbb cezarbbb deleted the cstyle-export-symbols branch June 26, 2026 01:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-run-make Area: port run-make Makefiles to rmake.rs O-apple Operating system: Apple / Darwin (macOS, iOS, tvOS, visionOS, watchOS) O-windows Operating system: Windows 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.

9 participants