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

use new linker flag /EMITTOOLVERSIONINFO:NO #17

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
6 changes: 1 addition & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
strategy:
matrix:
os:
- windows-2025
- windows-2022
- windows-2019
toolchain:
Expand All @@ -37,11 +38,6 @@ jobs:
toolchain: ${{ matrix.toolchain }}
components: clippy, rustfmt

- name: Patch MSVC linker
run: |
cargo install anonlink
anonlink

- name: Cargo build
run: cargo build --release

Expand Down
2 changes: 2 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ fn main() {
println!("cargo:rustc-link-arg-bins=/NODEFAULTLIB");
// Removes `IMAGE_DEBUG_DIRECTORY` from PE.
println!("cargo:rustc-link-arg-bins=/EMITPOGOPHASEINFO");
// Removes "Rich PE" header.
println!("cargo:rustc-link-arg-bins=/EMITTOOLVERSIONINFO:NO");
println!("cargo:rustc-link-arg-bins=/DEBUG:NONE");
// See: https://github.com/mcountryman/min-sized-rust-windows/pull/7
println!("cargo:rustc-link-arg-bins=/STUB:stub.exe");
Expand Down