google-cloud-cpp icon indicating copy to clipboard operation
google-cloud-cpp copied to clipboard

Reduce PDB size for storage_grpc feature

Open cuiy0006 opened this issue 9 months ago • 1 comments

We got

LINK : fatal error LNK1201: error writing to program database 'C:\b\google\cloud\storage\benchmarks\storage_throughput_vs_cpu_benchmark.pdb'; check for insufficient disk space, invalid path, or insufficient privilege

when building core feature for storage_grpc in debug mode.

We cannot use larger runner because the cost is high.

We need to research any way to reduce the PDB size of storage_grpc debug build.

cuiy0006 avatar Apr 09 '25 17:04 cuiy0006

Some thoughts,

  1. Using specific linker flags can strip unnecessary information from the PDB.
target_link_options(your_target PRIVATE "/PDBSTRIPPED" "/PDBCOMPRESS")
  1. Ensure that debug information is not generated at the compilation stage if it's not needed.
target_compile_options(your_target PRIVATE "/Zi")

cuiy0006 avatar Apr 09 '25 20:04 cuiy0006