Skip to content

Allow building LLVM DLL with MSVC#159574

Draft
Zoxc wants to merge 16 commits into
rust-lang:mainfrom
Zoxc:llvm-less-dylib-symbols
Draft

Allow building LLVM DLL with MSVC#159574
Zoxc wants to merge 16 commits into
rust-lang:mainfrom
Zoxc:llvm-less-dylib-symbols

Conversation

@Zoxc

@Zoxc Zoxc commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

This allows building a LLVM DLL with MSVC using the LLVM_BUILD_LLVM_DYLIB_VIS option which limit symbols exported by the shared library.

This PR as written would also change exported symbols for other targets, which may affect LLVM plugins if the required symbols are not exported.

nikic and others added 15 commits July 16, 2026 10:06
There is a minor change in sorted order due to:
llvm/llvm-project@5931034
There is now only a single "module asm", not one before each line.
The assume here is not really relevant to the purpose of the test,
and it's position changed in LLVM 23.
These now have additional !guid metadata.
We probably want to change this to align with Linux, but for now
keep the old behavior.
It's a dependency of LLVM now.
We can start matching the codegen introduced by LLVM at [1]. This alone
isn't enough to make f128 functional on the platform because libcalls
use the LLVM ABI.

Current behavior originally introduced in RUST-128388.

[1]: llvm/llvm-project@aa47e59
@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) labels Jul 19, 2026
@rust-log-analyzer

This comment has been minimized.

@Zoxc
Zoxc force-pushed the llvm-less-dylib-symbols branch from d438ff3 to afb8f68 Compare July 19, 2026 20:09
@Zoxc

Zoxc commented Jul 19, 2026

Copy link
Copy Markdown
Contributor Author

@bors try @rust-timer queue

@rust-timer

Copy link
Copy Markdown
Collaborator

Awaiting bors try build completion.

@rustbot label: +S-waiting-on-perf

@rustbot rustbot added the S-waiting-on-perf Status: Waiting on a perf run to be completed. label Jul 19, 2026
@rust-bors

This comment has been minimized.

rust-bors Bot pushed a commit that referenced this pull request Jul 19, 2026
@rust-bors

rust-bors Bot commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

💔 Test for 3415beb failed: CI. Failed job:

@rust-log-analyzer

This comment has been minimized.

@Zoxc
Zoxc force-pushed the llvm-less-dylib-symbols branch from afb8f68 to 13a11fd Compare July 20, 2026 07:14
@rustbot rustbot added A-CI Area: Our Github Actions CI A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. labels Jul 20, 2026
@rustbot rustbot added A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc F-autodiff `#![feature(autodiff)]` T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue. labels Jul 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CI Area: Our Github Actions CI A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. A-run-make Area: port run-make Makefiles to rmake.rs A-testsuite Area: The testsuite used to check the correctness of rustc F-autodiff `#![feature(autodiff)]` S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. S-waiting-on-perf Status: Waiting on a perf run to be completed. T-bootstrap Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap) T-infra Relevant to the infrastructure team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants