Allow to specify specific files for debug info (#111748)

Building with `USE_CUSTOM_DEBINFO=torch/csrc/Module.cpp python setup.py develop` for example will provide debug info only for this file.
This allows to enable debug symbols very fast from a non-debug build by doing a clean then develop (as long as you have ccache) and avoid very large binaries that take a very long time to load in gdb.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/111748
Approved by: https://github.com/drisspg, https://github.com/ezyang, https://github.com/malfet
This commit is contained in:
albanD
2023-10-23 14:00:54 +00:00
committed by PyTorch MergeBot
parent 024ffd342a
commit 236472b32a
2 changed files with 23 additions and 0 deletions

View File

@ -8,6 +8,9 @@
# REL_WITH_DEB_INFO
# build with optimizations and -g (debug symbols)
#
# USE_CUSTOM_DEBINFO="path/to/file1.cpp;path/to/file2.cpp"
# build with debug info only for specified files
#
# MAX_JOBS
# maximum number of compile jobs we should use to compile your code
#