Skip to content

fix: simplify build on Windows - #33

Open
yuvald-sweet-security wants to merge 1 commit into
Amanieu:masterfrom
yuvald-sweet-security:windows
Open

fix: simplify build on Windows#33
yuvald-sweet-security wants to merge 1 commit into
Amanieu:masterfrom
yuvald-sweet-security:windows

Conversation

@yuvald-sweet-security

Copy link
Copy Markdown

Hey,
This fixes a couple of issues I've had with building this crate on Windows:

  1. The C code includes <windows.h> but clang does not include the Windows SDK directory automatically; The INCLUDE variable is where the Visual Studio Developer Shell places such paths to be included by MSVC, and so including it seems like a semi-standard way to resolve this issue without forcing users to set CFLAGS manually.
  2. There are a lot of warnings coming from inside the Windows SDK headers, such as "warning: anonymous structs are a Microsoft extension" and "warning: non-portable path to file '"Windows.h"'; specified path differs in case from file name on disk"; these are printed in every build of my project which depends on this crate. Since as a user of this crate I don't have much to do about warnings anyway, I thought it would be a good idea to turn them off (maybe you still want to leave them on for your CI jobs?).

Let me know if you prefer to solve these in a different way.

@Amanieu

Amanieu commented Feb 27, 2026

Copy link
Copy Markdown
Owner

The correct approach here might be to not override the compiler and just have cc use MSVC instead of clang.

However I'm now wondering why you even need minicov on Windows? You can just use the normal profiler runtime on that platform.

@yuvald-sweet-security

Copy link
Copy Markdown
Author

The correct approach here might be to not override the compiler and just have cc use MSVC instead of clang.

However I'm now wondering why you even need minicov on Windows? You can just use the normal profiler runtime on that platform.

I'm using it to generate coverage for a kernel driver

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

Successfully merging this pull request may close these issues.

2 participants