Description of the bug:
We use /options:strict with MSVC as part of our minimum quality bar. As part of the bazel 8.0 upgrade everything it now fails to build any tool for exec.
example error:
ERROR: D:/bazel_bugs/strict_error/BUILD.bazel:2:10: Compiling tool.cpp [for tool] failed: (Exit 2): cl.exe failed: error executing CppCompile command (from target //:tool) C:\Program Files\Microsoft Visual Studio\2022\Professional\VC\Tools\MSVC\14.40.33807\bin\HostX64\x64\cl.exe @bazel-out/x64_windows-opt-exec-ST-d57f47055a04/bin/_objs/tool/tool.obj.params
cl : Command line error D8043 : unknown option '-g0'
cl : Command line error D8043 : unknown option '-g0'
Which category does this issue belong to?
C++ Rules, Starlark Integration
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
With the following example
strict_error2.zip
run:
bazel build //... --host_copt=-options:strict
Which operating system are you running Bazel on?
windows
What is the output of bazel info release?
release 8.0.0rc6
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 ?
No response
If this is a regression, please try to identify the Bazel commit where the bug was introduced with bazelisk --bisect.
first bad commit is 1acfb85
Have you found anything relevant by searching the web?
I believe the following lines introduced the problem.
|
"//command_line_option:copt": settings["//command_line_option:host_copt"] + ["-g0"], # Don't add for Windows |
Any other information, logs, or outputs that you want to share?
No response
Description of the bug:
We use
/options:strictwith MSVC as part of our minimum quality bar. As part of the bazel 8.0 upgrade everything it now fails to build any tool for exec.example error:
Which category does this issue belong to?
C++ Rules, Starlark Integration
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
With the following example
strict_error2.zip
run:
bazel build //... --host_copt=-options:strictWhich operating system are you running Bazel on?
windows
What is the output of
bazel info release?release 8.0.0rc6
If
bazel info releasereturnsdevelopment versionor(@non-git), tell us how you built Bazel.No response
What's the output of
git remote get-url origin; git rev-parse HEAD?No response
If this is a regression, please try to identify the Bazel commit where the bug was introduced with bazelisk --bisect.
first bad commit is 1acfb85
Have you found anything relevant by searching the web?
I believe the following lines introduced the problem.
bazel/src/main/starlark/builtins_bzl/common/builtin_exec_platforms.bzl
Line 343 in 3d7d157
Any other information, logs, or outputs that you want to share?
No response