1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-08 14:22:09 +03:00

libc++ sepatare build

This commit is contained in:
Leonid Fedorov
2025-07-14 16:51:17 +00:00
parent 680adce45d
commit d0439730e0
3 changed files with 16 additions and 5 deletions

View File

@@ -400,7 +400,7 @@ construct_cmake_flags() {
if [[ $MSAN = true ]]; then if [[ $MSAN = true ]]; then
warn "Building with Memory Sanitizer" warn "Building with Memory Sanitizer"
MDB_CMAKE_FLAGS+=(-DWITH_MSAN=ON -DWITH_COLUMNSTORE_REPORT_PATH=${REPORT_PATH}) MDB_CMAKE_FLAGS+=(-DWITH_MSAN=ON -DCOLUMNSTORE_WITH_LIBCPP=YES -DWITH_COLUMNSTORE_REPORT_PATH=${REPORT_PATH})
fi fi
if [[ $WITHOUT_COREDUMPS = true ]]; then if [[ $WITHOUT_COREDUMPS = true ]]; then
@@ -800,6 +800,7 @@ init_submodules
if [[ $BUILD_PACKAGES = true ]]; then if [[ $BUILD_PACKAGES = true ]]; then
modify_packaging modify_packaging
fix_config_files fix_config_files
(build_package && run_unit_tests) (build_package && run_unit_tests)
exit_code=$? exit_code=$?

View File

@@ -22,8 +22,13 @@ set(Boost_LIBRARY_DIRS "${INSTALL_LOCATION}/lib")
link_directories("${Boost_LIBRARY_DIRS}") link_directories("${Boost_LIBRARY_DIRS}")
set(_cxxargs "-fPIC -DBOOST_NO_AUTO_PTR -fvisibility=default") set(_cxxargs "-fPIC -DBOOST_NO_AUTO_PTR -fvisibility=default")
if(WITH_MSAN) if(WITH_MSAN)
set(_cxxargs "${_cxxargs} -fsanitize=memory -fsanitize-memory-track-origins -U_FORTIFY_SOURCE -stdlib=libc++") set(_cxxargs "${_cxxargs} -fsanitize=memory -fsanitize-memory-track-origins -U_FORTIFY_SOURCE")
endif()
if(COLUMNSTORE_WITH_LIBCPP)
set(_cxxargs "${_cxxargs} -stdlib=libc++")
endif() endif()
set(_b2args cxxflags=${_cxxargs};cflags=-fPIC;threading=multi;${_extra};toolset=${_toolset} set(_b2args cxxflags=${_cxxargs};cflags=-fPIC;threading=multi;${_extra};toolset=${_toolset}

View File

@@ -33,9 +33,14 @@ set(THRIFT_INCLUDE_DIRS "${INSTALL_LOCATION}/include")
set(THRIFT_LIBRARY_DIRS "${INSTALL_LOCATION}/lib") set(THRIFT_LIBRARY_DIRS "${INSTALL_LOCATION}/lib")
set(THRIFT_LIBRARY ${THRIFT_LIBRARY_DIRS}/${CMAKE_STATIC_LIBRARY_PREFIX}thrift${CMAKE_STATIC_LIBRARY_SUFFIX}) set(THRIFT_LIBRARY ${THRIFT_LIBRARY_DIRS}/${CMAKE_STATIC_LIBRARY_PREFIX}thrift${CMAKE_STATIC_LIBRARY_SUFFIX})
set(cxxflags -fPIC) set(cxxflags "-fPIC")
if(WITH_MSAN) if(WITH_MSAN)
set(cxxflags "'${cxxflags} -fsanitize=memory -fsanitize-memory-track-origins -U_FORTIFY_SOURCE -stdlib=libc++'") set(cxxflags "${cxxflags} -fsanitize=memory -fsanitize-memory-track-origins -U_FORTIFY_SOURCE")
endif()
if(COLUMNSTORE_WITH_LIBCPP)
set(cxxflags "${cxxflags} -stdlib=libc++")
endif() endif()
ExternalProject_Add( ExternalProject_Add(
@@ -57,7 +62,7 @@ ExternalProject_Add(
-DBUILD_TUTORIALS=NO -DBUILD_TUTORIALS=NO
-DCMAKE_C_COMPILER=${CMAKE_C_COMPILER} -DCMAKE_C_COMPILER=${CMAKE_C_COMPILER}
-DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER} -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
-DCMAKE_CXX_FLAGS:STRING=${cxxflags} -DCMAKE_CXX_FLAGS:STRING="'${cxxflags}'"
-DBOOST_ROOT=${BOOST_ROOT} -DBOOST_ROOT=${BOOST_ROOT}
BUILD_BYPRODUCTS "${THRIFT_LIBRARY_DIRS}/${CMAKE_STATIC_LIBRARY_PREFIX}thrift${CMAKE_STATIC_LIBRARY_SUFFIX}" BUILD_BYPRODUCTS "${THRIFT_LIBRARY_DIRS}/${CMAKE_STATIC_LIBRARY_PREFIX}thrift${CMAKE_STATIC_LIBRARY_SUFFIX}"
EXCLUDE_FROM_ALL TRUE EXCLUDE_FROM_ALL TRUE