adonis0147 commented on code in PR #15807:
URL: https://github.com/apache/doris/pull/15807#discussion_r1066644368
##########
thirdparty/build-thirdparty.sh:
##########
@@ -1545,12 +1545,43 @@ build_concurrentqueue() {
cp ./*.h "${TP_INSTALL_DIR}/include/"
}
+#clucene
+build_clucene() {
+ if [[ -z ${USE_AVX2} ]]; then
+ USE_AVX2=1
+ fi
+ if [[ -z ${BUILD_TYPE} ]]; then
+ BUILD_TYPE=Release
+ fi
+ check_if_source_exist "${CLUCENE_SOURCE}"
+ cd "${TP_SOURCE_DIR}/${CLUCENE_SOURCE}"
+ mkdir -p "${BUILD_DIR}" && cd "${BUILD_DIR}"
+ rm -rf CMakeCache.txt CMakeFiles/
+
+ if [[ "${CC}" == *gcc ]]; then
+ CPPFLAGS="-fno-omit-frame-pointer -g -Wno-narrowing" \
+ CXXFLAGS="-fno-omit-frame-pointer -g -Wno-narrowing" \
Review Comment:
By the way, CMake don't provide `ASAN` build type by default. You would
better add `-g` to these variables
([CXX_FLAGS_ASAN](https://github.com/apache/doris-thirdparty/blob/clucene/CMakeLists.txt#L120)
and
[CXX_FLAGS_LSAN](https://github.com/apache/doris-thirdparty/blob/clucene/CMakeLists.txt#L121))
in `CMakeLists.txt` of
[clucene](https://github.com/apache/doris-thirdparty/tree/clucene).
Examples:
```CMakeLists.txt
if (__COMPILER_CLANG)
SET(CXX_FLAGS_ASAN "${CXX_GCC_FLAGS} -O0 -g -fsanitize=address
-DADDRESS_SANITIZER")
SET(CXX_FLAGS_LSAN "${CXX_GCC_FLAGS} -O0 -g -fsanitize=leak
-DLEAK_SANITIZER")
else ()
SET(CXX_FLAGS_ASAN "${CXX_GCC_FLAGS} -O0 -g -fsanitize=address
-DADDRESS_SANITIZER -static-libasan")
SET(CXX_FLAGS_LSAN "${CXX_GCC_FLAGS} -O0 -g -fsanitize=leak
-DLEAK_SANITIZER -static-liblsan")
endif ()
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]