forked from openGauss-Ecosystem/openGauss-server
!1800 优化编译选项,提高数据库性能
Merge pull request !1800 from cc_db_dev/complie_op
This commit is contained in:
commit
38a87bdb66
|
@ -29836,7 +29836,7 @@ platform_version=`sh ./src/get_PlatForm_str.sh`
|
|||
is_euler=`echo $platform_version | grep euleros`
|
||||
# New gcc version should be compatible to old one
|
||||
if test "$CC_VERSION" = "$NEW_GCC"; then
|
||||
CFLAGS=" -std=c++11 -D_GLIBCXX_USE_CXX11_ABI=0 $CFLAGS -fno-aggressive-loop-optimizations -Wno-attributes -fno-omit-frame-pointer -fno-expensive-optimizations"
|
||||
CFLAGS=" -D_GLIBCXX_USE_CXX11_ABI=0 $CFLAGS -Wno-attributes "
|
||||
CFLAGS="$CFLAGS -Wno-unused-but-set-variable"
|
||||
if test "$is_euler" != ""; then
|
||||
if test "${enable_cassert}" = no -o "${enable_memory_check}" = no -a "${enable_ut}" = no; then
|
||||
|
|
|
@ -823,15 +823,13 @@ CXXFLAGS = @CFLAGS@
|
|||
ifeq ($(enable_memory_check), yes)
|
||||
CXXFLAGS += -fsanitize=address -fsanitize=leak -fno-omit-frame-pointer
|
||||
else
|
||||
CXXFLAGS += -fstack-protector
|
||||
#CXXFLAGS += -fstack-protector
|
||||
endif
|
||||
|
||||
ifeq ($(enable_thread_check), yes)
|
||||
CXXFLAGS += -fsanitize=thread -fno-omit-frame-pointer
|
||||
endif
|
||||
|
||||
CXXFLAGS += -Wl,-z,relro,-z,now
|
||||
CXXFLAGS += -Wl,-z,noexecstack
|
||||
CXXFLAGS += -std=c++14
|
||||
override CXXFLAGS += $(PTHREAD_CFLAGS)
|
||||
# Kind-of compilers
|
||||
|
|
Loading…
Reference in New Issue