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

Support native vcxproj #26

Closed
stan-sz opened this issue Jan 9, 2023 · 1 comment
Closed

Support native vcxproj #26

stan-sz opened this issue Jan 9, 2023 · 1 comment

Comments

@stan-sz
Copy link
Contributor

stan-sz commented Jan 9, 2023

The Microsoft C++ Linker includes a flag /VERBOSE:UNUSEDLIBS that writes additional information to stdout about .lib files that were unused. A similar flag /VERBOSE:UNUSEDDELAYLOAD can point to delay-load DLL references whose code was unused.

@erikmav
Copy link
Contributor

erikmav commented Sep 5, 2023

I tried a quick prototype of this but run into a problem that I can't figure out how to get the contents of stdout from the Link task's tool task execution. Without this ability to reflect on stdout it's going to be difficult to feed back into a build break.

A minimum viable product would be to enable the two linker flags noted above when ReferenceTrimmer is installed, then document common libraries seen in the output and how to disable them. The linker output shows all .lib files even if they are DLL import libraries and not code bundles, and will usually include things like user32.lib and ws2_32.lib, which need specific guidance to fix (can be in a doc file - involves modifying the default AdditionalDependencies property to only list needed import libraries).

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

No branches or pull requests

3 participants