Joe McDonnell has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/20870 )
Change subject: IMPALA-12686: Build the toolchain with basic debug information (-g1) ...................................................................... IMPALA-12686: Build the toolchain with basic debug information (-g1) Basic debug information (e.g. -g1) is useful for getting better stack traces. Compressing debug information (-gz) reduces the size of this debug information dramatically. This adds both -g1 and -gz to the default flags for the toolchain. In order to have the flags apply uniformly, components need to respect the existing CFLAGS and CXXFLAGS. Several components were setting their own CFLAGS and CXXFLAGS without keeping the existing flags, so this either fixes the components to keep existing flags or removes the custom CFLAGS/CXXFLAGS. Some components build with an extra -g after our flags and these continue to build this way. Specifically, the following using -g: - Thrift (-g added in this change) - Kudu - ORC - CCTZ - bzip2 These keep the same debug information they had before, except that -gz compresses it now. This change should not reduce the debug information for any component. This skips generating debug information for a few things: 1. Build tools like CMake and Mold don't need debuginfo 2. LLVM's release build has an enormous amount of debuginfo, even at -g1. If this uses debuginfo for LLVM, it adds hundreds of MB to impalad's binary size. This skips that for now. 3. Kudu's thirdparty includes a build of LLVM, so this turns off debuginfo for Kudu's thirdparty. Testing: - Ran a build and examined what happened to the package sizes. The total size of the toolchain directory for Impala went down from 7.08GB to 6.51GB. Kudu got much smaller due to compressing debuginfo. Most other libraries got larger. - Ran an Impala build to look at what happened to the binary size. This adds about 31MB to the compressed binary size. It has no impact on the stripped size. - Added verbosity to print the compiler commands and verified the flags were present Change-Id: Iee2e264b281f83ebc226d9bf7d4e5a99a52f1fc6 Reviewed-on: http://gerrit.cloudera.org:8080/20870 Reviewed-by: Joe McDonnell <[email protected]> Tested-by: Joe McDonnell <[email protected]> --- M init-compiler.sh M source/arrow/build.sh M source/bzip2/build.sh M source/calloncehack/calloncehack/CMakeLists.txt M source/cloudflarezlib/build.sh M source/cmake/build.sh M source/curl/build.sh M source/flatbuffers/build.sh M source/gflags/build.sh M source/glog/build.sh M source/kudu/build.sh M source/libpfm/build.sh M source/llvm/build-source-tarball.sh M source/lz4/build.sh M source/mold/build.sh M source/orc/build.sh M source/python/build.sh M source/thrift/build.sh M source/zlib/build.sh 19 files changed, 58 insertions(+), 40 deletions(-) Approvals: Joe McDonnell: Looks good to me, approved; Verified -- To view, visit http://gerrit.cloudera.org:8080/20870 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: native-toolchain Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Iee2e264b281f83ebc226d9bf7d4e5a99a52f1fc6 Gerrit-Change-Number: 20870 Gerrit-PatchSet: 6 Gerrit-Owner: Joe McDonnell <[email protected]> Gerrit-Reviewer: Joe McDonnell <[email protected]> Gerrit-Reviewer: Laszlo Gaal <[email protected]> Gerrit-Reviewer: Michael Smith <[email protected]>
