Jac1494 added a comment. >> I'd be curious to the answer to David's questions. If the size increase is >> because of unused extern variables coming in from libc or something then it >> doesn't seem worth the cost.
For above case clang size is increase because ,it is difference between clang build without "-fstandalone-debug" option and clang build with "-fstandalone-debug" option and both build contain change D71451 <https://reviews.llvm.org/D71451> and D71599 <https://reviews.llvm.org/D71599> . So for clang build with "-fstandalone-debug" option size will be more because it will add debuginfo. And to check impact of my change on clang i have build clang with and without D71451 <https://reviews.llvm.org/D71451> and D71599 <https://reviews.llvm.org/D71599> change(testcases are not included). Size of clang without D71451 and D71599 change and with option "-fstandalone-debug":- ===================================================================================== … .comment 159 0 .debug_str 3994952 0 .debug_loc 941 0 .debug_abbrev 12754 0 .debug_info 2223641 0 .debug_ranges 46592 0 .debug_line 153901 0 .note.gnu.gold-version 28 0 Total 6827932 Size of clang with D71451 and D71599 change and with option "-fstandalone-debug":- =================================================================================== … .comment 159 0 .debug_str 3994894 0 .debug_loc 941 0 .debug_abbrev 12746 0 .debug_info 2223617 0 .debug_ranges 46592 0 .debug_line 153865 0 .note.gnu.gold-version 28 0 Total 6827806 Size of clang with D71451 <https://reviews.llvm.org/D71451> and D71599 <https://reviews.llvm.org/D71599> is reduced. This results are with latest source and with self-host build of clang. First I have build clang with Release mode and using that clang I have build clang with debug mode with below options “cmake -DLLVM_ENABLE_PROJECTS=clang -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=$(which clang) -DCMAKE_CXX_COMPILER=$(which clang++) -DLLVM_TARGETS_TO_BUILD="X86" -DBUILD_SHARED_LIBS=On -DCMAKE_CXX_FLAGS="-fstandalone-debug" -DCMAKE_C_FLAGS="-fstandalone-debug" -DCMAKE_INSTALL_PREFIX=/home/bft/Jaydeep/latest_llvm/llvm-project/install_withhstandalone ../llvm” CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71451/new/ https://reviews.llvm.org/D71451 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits