This is an automated email from the ASF dual-hosted git repository.
yiguolei pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 573ebf235e [enhancement](build) Support customizing extra compile
flags (#11444)
573ebf235e is described below
commit 573ebf235ed1e0fff3df5fdb7f886a685c2bb110
Author: Adonis Ling <[email protected]>
AuthorDate: Wed Aug 3 11:02:17 2022 +0800
[enhancement](build) Support customizing extra compile flags (#11444)
---
be/CMakeLists.txt | 2 +-
build.sh | 5 ++++-
run-be-ut.sh | 5 ++++-
3 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/be/CMakeLists.txt b/be/CMakeLists.txt
index f47dfd978f..6d96322f93 100644
--- a/be/CMakeLists.txt
+++ b/be/CMakeLists.txt
@@ -548,7 +548,7 @@ else()
endif()
# Add flags that are common across build types
-SET(CMAKE_CXX_FLAGS "${CXX_COMMON_FLAGS} ${CMAKE_CXX_FLAGS}")
+SET(CMAKE_CXX_FLAGS "${CXX_COMMON_FLAGS} ${CMAKE_CXX_FLAGS}
${EXTRA_CXX_FLAGS}")
message(STATUS "Compiler Flags: ${CMAKE_CXX_FLAGS}")
diff --git a/build.sh b/build.sh
index 38aac6bda9..e35f8b08fe 100755
--- a/build.sh
+++ b/build.sh
@@ -293,6 +293,7 @@ if [ ${BUILD_BE} -eq 1 ] ; then
MAKE_PROGRAM="$(which "${BUILD_SYSTEM}")"
echo "-- Make program: ${MAKE_PROGRAM}"
echo "-- Use ccache: ${CMAKE_USE_CCACHE}"
+ echo "-- Extra cxx flags: ${EXTRA_CXX_FLAGS}"
mkdir -p ${CMAKE_BUILD_DIR}
cd ${CMAKE_BUILD_DIR}
@@ -313,7 +314,9 @@ if [ ${BUILD_BE} -eq 1 ] ; then
-DUSE_JEMALLOC=${USE_JEMALLOC} \
-DSTRICT_MEMORY_USE=${STRICT_MEMORY_USE} \
-DUSE_AVX2=${USE_AVX2} \
- -DGLIBC_COMPATIBILITY=${GLIBC_COMPATIBILITY} ${DORIS_HOME}/be/
+ -DGLIBC_COMPATIBILITY=${GLIBC_COMPATIBILITY} \
+ -DEXTRA_CXX_FLAGS="${EXTRA_CXX_FLAGS}" \
+ ${DORIS_HOME}/be/
${BUILD_SYSTEM} -j ${PARALLEL}
${BUILD_SYSTEM} install
cd ${DORIS_HOME}
diff --git a/run-be-ut.sh b/run-be-ut.sh
index f0ce2f7035..c528d04368 100755
--- a/run-be-ut.sh
+++ b/run-be-ut.sh
@@ -125,6 +125,7 @@ fi
MAKE_PROGRAM="$(which "${BUILD_SYSTEM}")"
echo "-- Make program: ${MAKE_PROGRAM}"
echo "-- Use ccache: ${CMAKE_USE_CCACHE}"
+echo "-- Extra cxx flags: ${EXTRA_CXX_FLAGS}"
cd ${CMAKE_BUILD_DIR}
${CMAKE_CMD} -G "${GENERATOR}" \
@@ -139,7 +140,9 @@ ${CMAKE_CMD} -G "${GENERATOR}" \
-DUSE_MEM_TRACKER=ON \
-DUSE_JEMALLOC=OFF \
-DSTRICT_MEMORY_USE=OFF \
- ${CMAKE_USE_CCACHE} ${DORIS_HOME}/be/
+ -DEXTRA_CXX_FLAGS="${EXTRA_CXX_FLAGS}" \
+ ${CMAKE_USE_CCACHE} \
+ ${DORIS_HOME}/be/
${BUILD_SYSTEM} -j ${PARALLEL}
if [ ${RUN} -ne 1 ]; then
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]