adonis0147 commented on code in PR #11400:
URL: https://github.com/apache/doris/pull/11400#discussion_r935334238


##########
be/CMakeLists.txt:
##########
@@ -517,7 +517,7 @@ set(CXX_FLAGS_DEBUG "${CXX_GCC_FLAGS} -O0")
 #   -O3: Enable all compiler optimizations
 #   -DNDEBUG: Turn off dchecks/asserts/debug only code.
 set(CXX_FLAGS_RELEASE "${CXX_GCC_FLAGS} -O3 -DNDEBUG")
-SET(CXX_FLAGS_ASAN "${CXX_GCC_FLAGS} -O0 -fsanitize=address 
-DADDRESS_SANITIZER")
+SET(CXX_FLAGS_ASAN "${CXX_GCC_FLAGS} -O3 -fsanitize=address 
-DADDRESS_SANITIZER")

Review Comment:
   > Could you please provide the command line how to use the configuration?
   
   It is simple. If we pass multiple optimization levels to gcc, only the last 
one takes effect. We can just modify the 
[L551](https://github.com/apache/doris/pull/11400/files#diff-3507aac2aff9b5fe5f66d28967f3aa848491d4ced2466f6bf201ab3a97531837L551).
 Introduce a new variable and pass it from `build.sh` and `run-be-ut.sh`.
   
   Reference:
   
   > If you use multiple -O options, with or without level numbers, the last 
such option is the one that is effective.
   
   
[Optimize-Options](https://gcc.gnu.org/onlinedocs/gcc-12.1.0/gcc/Optimize-Options.html#Optimize-Options)
   



-- 
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: commits-unsubscr...@doris.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to