From 71fc1057cd446ff646ecf3af8236968e5f0eee2d Mon Sep 17 00:00:00 2001 From: Wes McKinney Date: Thu, 20 Apr 2017 09:32:10 -0400 Subject: [PATCH] Do not include debug symbols in release builds by default Change-Id: I8dea5be357b0d511a1ebc51d4311249c78a1f564 --- cpp/cmake_modules/SetupCxxFlags.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cpp/cmake_modules/SetupCxxFlags.cmake b/cpp/cmake_modules/SetupCxxFlags.cmake index 7e229ff90a3e..e2106559ba02 100644 --- a/cpp/cmake_modules/SetupCxxFlags.cmake +++ b/cpp/cmake_modules/SetupCxxFlags.cmake @@ -71,11 +71,12 @@ endif() # Same as DEBUG, except with some optimizations on. # For CMAKE_BUILD_TYPE=Release # -O3: Enable all compiler optimizations -# -g: Enable symbols for profiler tools (TODO: remove for shipping) +# Debug symbols are stripped for reduced binary size. Add +# -DARROW_CXXFLAGS="-g" to add them if (NOT MSVC) set(CXX_FLAGS_DEBUG "-ggdb -O0") set(CXX_FLAGS_FASTDEBUG "-ggdb -O1") - set(CXX_FLAGS_RELEASE "-O3 -g -DNDEBUG") + set(CXX_FLAGS_RELEASE "-O3 -DNDEBUG") endif() set(CXX_FLAGS_PROFILE_GEN "${CXX_FLAGS_RELEASE} -fprofile-generate")