Description of the problem / feature request:
We would like to generate .pdb files for release builds of Envoy for Windows for use debugging potential production issues. This works well with Bazel building locally as all intermediate/compiler/linker generated files live on the host. We use opt mode, the MSVC cl /Z7 option, and linker options /DEBUG:FULL. However, building Envoy with RBE in CI, the expected .pdb file output is not accessible. It is not an explicit output of the cc_binary rule on Windows and is not downloaded to the host running the build (or presumably any rules that were to depend on the binary target, not sure if a genrule workaround could work to grab the relevant file). This is in contrast to Linux where cc_binary rules create an implicit <target>.dwp target that can be used to access debug info. Using --remote_download_outputs=all (the default) or --features=generate_pdb_file does not work as the feature is only enabled for dbg and fastbuild compilation modes.
It would be great if the restriction of the feature to dbg and fastbuild modes was relaxed
Feature requests: what underlying problem are you trying to solve with this feature?
See above, generate .pdb files as when building Envoy with RBE in opt compilation mode.
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Build a cc_binary rule in opt compilation mode and link with MSVC link /DEBUG options to generate a .pdb file in RBE on Windows. See that no .pdb file is downloaded even when using --features=generate_pdb_file or --remote_download_outputs=all.
What operating system are you running Bazel on?
Windows (2019)
What's the output of bazel info release?
release 3.6.0
What version of rules_cc do you use? Can you paste the workspace rule used to fetch rules_cc? What other relevant dependencies does your project have?
https://github.com/envoyproxy/envoy/blob/d382fa60412b1bf3c8b1d82883119c15216d69fc/bazel/repository_locations.bzl#L535-L546
What Bazel options do you use to trigger the issue? What C++ toolchain do you use?
C++ toolchain: https://github.com/envoyproxy/envoy-build-tools/tree/master/toolchains/configs/windows/msvc-cl/bazel_3.6.0 (generated via bazel-toolchains)
Have you found anything relevant by searching the web?
Not as of yet
Any other information, logs, or outputs that you want to share?
Not as of yet
Description of the problem / feature request:
We would like to generate
.pdbfiles for release builds of Envoy for Windows for use debugging potential production issues. This works well with Bazel building locally as all intermediate/compiler/linker generated files live on the host. We useoptmode, the MSVC cl/Z7option, and linker options/DEBUG:FULL. However, building Envoy with RBE in CI, the expected.pdbfile output is not accessible. It is not an explicit output of thecc_binaryrule on Windows and is not downloaded to the host running the build (or presumably any rules that were to depend on the binary target, not sure if agenruleworkaround could work to grab the relevant file). This is in contrast to Linux wherecc_binaryrules create an implicit<target>.dwptarget that can be used to access debug info. Using--remote_download_outputs=all(the default) or--features=generate_pdb_filedoes not work as the feature is only enabled fordbgandfastbuildcompilation modes.It would be great if the restriction of the feature to
dbgandfastbuildmodes was relaxedFeature requests: what underlying problem are you trying to solve with this feature?
See above, generate
.pdbfiles as when building Envoy with RBE inoptcompilation mode.Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Build a
cc_binaryrule inoptcompilation mode and link with MSVC link/DEBUGoptions to generate a.pdbfile in RBE on Windows. See that no.pdbfile is downloaded even when using--features=generate_pdb_fileor--remote_download_outputs=all.What operating system are you running Bazel on?
Windows (2019)
What's the output of
bazel info release?release 3.6.0What version of rules_cc do you use? Can you paste the workspace rule used to fetch rules_cc? What other relevant dependencies does your project have?
https://github.com/envoyproxy/envoy/blob/d382fa60412b1bf3c8b1d82883119c15216d69fc/bazel/repository_locations.bzl#L535-L546
What Bazel options do you use to trigger the issue? What C++ toolchain do you use?
C++ toolchain: https://github.com/envoyproxy/envoy-build-tools/tree/master/toolchains/configs/windows/msvc-cl/bazel_3.6.0 (generated via
bazel-toolchains)Have you found anything relevant by searching the web?
Not as of yet
Any other information, logs, or outputs that you want to share?
Not as of yet