google-cloud-cpp
google-cloud-cpp copied to clipboard
Reduce PDB size for storage_grpc feature
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.
Some thoughts,
- Using specific linker flags can strip unnecessary information from the PDB.
target_link_options(your_target PRIVATE "/PDBSTRIPPED" "/PDBCOMPRESS")
- Ensure that debug information is not generated at the compilation stage if it's not needed.
target_compile_options(your_target PRIVATE "/Zi")