Skip to content

Fix windows builds #252

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

Merged
merged 3 commits into from
May 21, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
[alias]
compiletest = "run --release -p compiletests --"


[target.x86_64-pc-windows-msvc]
# Using Rust's LLD linker to avoid MSVC linker limitations
linker = "rust-lld.exe"
rustflags = [
# Disables cross-crate generic sharing to work around Windows PE export limits.
# Should prevent:
# - LNK1189 (too many objects)
# - LNK1248 (too many exports)
"-Zshare-generics=n", # =off is also an option, but you're going to increase binary size in doing so.
]

[target.'cfg(all())']
rustflags = [
# FIXME(eddyb) update/review these lints.
Expand Down