mirror of
https://github.com/apache/impala.git
synced 2025-12-19 18:12:08 -05:00
IMPALA-11110: Switch debug builds to use -Og
GCC's -Og applies optimizations that are compatible with being debuggable. It is similar to -O1 and results in a modest speed-up. This modifies the default debug build to use -Og, so it is now more akin to a fastdebug mode. Even though -Og is intended to preserve debuggability, optimization always impacts debuggability and -Og is no exception. To enable the old behavior, this adds a DEBUG_NOOPT build mode that retains the old non-optimized behavior. Using the -debug_noopt flag with buildall.sh enables this behavior. Change-Id: Ie06c149c8181c90572b8668bd01dfd26c0a5971e Reviewed-on: http://gerrit.cloudera.org:8080/18200 Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com> Reviewed-by: Laszlo Gaal (Cloudera) <laszlo.gaal@cloudera.com> Reviewed-by: Csaba Ringhofer <csringhofer@cloudera.com>
This commit is contained in:
14
buildall.sh
14
buildall.sh
@@ -75,6 +75,7 @@ BUILD_UBSAN=0
|
||||
BUILD_UBSAN_FULL=0
|
||||
BUILD_TSAN=0
|
||||
BUILD_TSAN_FULL=0
|
||||
BUILD_DEBUG_NOOPT=0
|
||||
BUILD_SHARED_LIBS=0
|
||||
# Export MAKE_CMD so it is visible in scripts that invoke make, e.g. copy-udfs-udas.sh
|
||||
export MAKE_CMD=make
|
||||
@@ -145,9 +146,12 @@ do
|
||||
-tsan)
|
||||
BUILD_TSAN=1
|
||||
;;
|
||||
-full_tsan)
|
||||
-full_tsan)
|
||||
BUILD_TSAN_FULL=1
|
||||
;;
|
||||
-debug_noopt)
|
||||
BUILD_DEBUG_NOOPT=1
|
||||
;;
|
||||
-testpairwise)
|
||||
EXPLORATION_STRATEGY=pairwise
|
||||
;;
|
||||
@@ -226,6 +230,10 @@ do
|
||||
echo "[-full_ubsan] : Undefined behavior sanitizer build, including code generated"\
|
||||
"by cross-compilation to LLVM IR. Much slower queries than plain -ubsan"\
|
||||
"[Default: False]"
|
||||
echo "[-debug_noopt] : Debug build without optimizations applied. The regular"\
|
||||
"debug build applies basic optimizations, but even these optimizations may"\
|
||||
"impact debuggability, so this is an option to omit the optimizations."\
|
||||
"[Default: False]"
|
||||
echo "[-skiptests] : Skips execution of all tests"
|
||||
echo "[-notests] : Skips building and execution of all tests"
|
||||
echo "[-start_minicluster] : Start test cluster including Impala and all"\
|
||||
@@ -325,6 +333,10 @@ if [[ ${BUILD_TSAN_FULL} -eq 1 ]]; then
|
||||
CMAKE_BUILD_TYPE_LIST+=(TSAN_FULL)
|
||||
export TSAN_FULL=1
|
||||
fi
|
||||
if [[ ${BUILD_DEBUG_NOOPT} -eq 1 ]]; then
|
||||
CMAKE_BUILD_TYPE_LIST+=(DEBUG_NOOPT)
|
||||
export DEBUG_NOOPT=1
|
||||
fi
|
||||
if [[ -n "${CMAKE_BUILD_TYPE_LIST:+1}" ]]; then
|
||||
if [[ ${#CMAKE_BUILD_TYPE_LIST[@]} -gt 1 ]]; then
|
||||
echo "ERROR: more than one CMake build type defined: ${CMAKE_BUILD_TYPE_LIST[@]}"
|
||||
|
||||
Reference in New Issue
Block a user