Skip to content

warning BA6006 Rust debug, suggest that we should use LTCG on debug builgs. #1051

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

Open
xnorpx opened this issue Feb 28, 2025 · 2 comments
Open
Assignees
Labels
rust Rust

Comments

@xnorpx
Copy link

xnorpx commented Feb 28, 2025

Started going through BinSkim errors on my Rust build and here is the first one.

Not sure one should recommend LTCG on debug builds?

BinSkim Note BA6006 - File: target/x86_64-pc-windows-msvc/debug/MY_BINARY.exe. Signature: 84a4a382eb5e8dba8929ed2f3596a10c9bceb4e79ea132a764156242a6ac0190Tool: BinSkim: Rule: BA6006 (EnableLinkTimeCodeGeneration). https://github.com/microsoft/binskim/blob/main/docs/BinSkimRules.md#rule-BA6006EnableLinkTimeCodeGeneration'MY_BINARY.exe' was compiled without Link Time Code Generation (/LTCG). Enabling LTCG can improve optimizations and performance.
For VC projects use WholeProgramOptimization property with 'true' value.

@marekaldorf
Copy link
Collaborator

@xnorpx I think the main purpose of BinSkim is to check release/production code, so you're right for some debug cases it might be too strict.

What are you suggesting?

@marekaldorf marekaldorf added the rust Rust label Apr 3, 2025
@marekaldorf marekaldorf self-assigned this Apr 3, 2025
@xnorpx
Copy link
Author

xnorpx commented Apr 3, 2025

@marekaldorf My suggestion would be to not emit this warning on Debug builds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rust Rust
Projects
None yet
Development

No branches or pull requests

2 participants