You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/07/21 08:15:56 UTC

[GitHub] [arrow] pitrou commented on a diff in pull request #13661: [C++][DONOTMERGE] Use -O2 instead of -O3 for RELEASE builds

pitrou commented on code in PR #13661:
URL: https://github.com/apache/arrow/pull/13661#discussion_r926388097


##########
cpp/cmake_modules/SetupCxxFlags.cmake:
##########
@@ -597,25 +597,32 @@ endif()
 # For CMAKE_BUILD_TYPE=FastDebug
 #   Same as DEBUG, except with some optimizations on.
 # For CMAKE_BUILD_TYPE=Release
-#   -O3: Enable all compiler optimizations
+#   -O2: Enable all compiler optimizations
 #   Debug symbols are stripped for reduced binary size. Add
 #   -DARROW_CXXFLAGS="-g" to add them
+
 if(NOT MSVC)
+  string(REPLACE "-O3 -DNDEBUG" "" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")

Review Comment:
   Why remove `-DNDEBUG` here? 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org