The default compiler flags in the windows cc toolchain automatically inserts command line arguments that cannot be disabled. The one that is causing my heartache is "/D_WIN32_WINNT=0x0601", which tells the compiler to target windows 7 features.
Which category does this issue belong to?
C++ Rules
What underlying problem are you trying to solve with this feature?
I maintain a bazel-ified fork of an open source project that relies on a feature added in windows 8.
It formerly used GetSystemTimeAsFileTime, which would compile, but then it was updated to get more precise timing information, and due to the non-configurable WIN32_WINNT bazel adds by default, the code no longer compiles without doing some hacks
Which operating system are you running Bazel on?
Windows 11
What is the output of bazel info release?
release 7.1.1
If bazel info release returns development version or (@non-git), tell us how you built Bazel.
No response
What's the output of git remote get-url origin; git rev-parse HEAD ?
Have you found anything relevant by searching the web?
12737 describes a similar complaint. In the issue, a PR of #14735 is mentioned, but then I get this issue.
In the meantime, I can add a copt to undefine it with U_WIN32_WINNT, but it yields a message like this for each compilation step
cl : Command line warning D9025 : overriding '/D_WIN32_WINNT=0x0601' with '/U_WIN32_WINNT'
Any other information, logs, or outputs that you want to share?
Description of the feature request:
The default compiler flags in the windows cc toolchain automatically inserts command line arguments that cannot be disabled. The one that is causing my heartache is
"/D_WIN32_WINNT=0x0601"
, which tells the compiler to target windows 7 features.Which category does this issue belong to?
C++ Rules
What underlying problem are you trying to solve with this feature?
I maintain a bazel-ified fork of an open source project that relies on a feature added in windows 8.
It formerly used
GetSystemTimeAsFileTime
, which would compile, but then it was updated to get more precise timing information, and due to the non-configurableWIN32_WINNT
bazel adds by default, the code no longer compiles without doing some hacksWhich operating system are you running Bazel on?
Windows 11
What is the output of
bazel info release
?release 7.1.1
If
bazel info release
returnsdevelopment version
or(@non-git)
, tell us how you built Bazel.No response
What's the output of
git remote get-url origin; git rev-parse HEAD
?Have you found anything relevant by searching the web?
12737 describes a similar complaint. In the issue, a PR of #14735 is mentioned, but then I get this issue.
In the meantime, I can add a copt to undefine it with
U_WIN32_WINNT
, but it yields a message like this for each compilation stepcl : Command line warning D9025 : overriding '/D_WIN32_WINNT=0x0601' with '/U_WIN32_WINNT'
Any other information, logs, or outputs that you want to share?
No response