Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
1fd294d1
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22017
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
1fd294d1
编写于
6月 15, 2023
作者:
W
wade zhang
提交者:
GitHub
6月 15, 2023
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #21727 from taosdata/enh/TD-24671-M
enh: decrease the package size
上级
5e942266
de1483d1
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
77 addition
and
63 deletion
+77
-63
cmake/cmake.define
cmake/cmake.define
+16
-12
contrib/CMakeLists.txt
contrib/CMakeLists.txt
+12
-2
packaging/deb/makedeb.sh
packaging/deb/makedeb.sh
+6
-6
packaging/rpm/tdengine.spec
packaging/rpm/tdengine.spec
+6
-6
packaging/tools/install.sh
packaging/tools/install.sh
+7
-7
packaging/tools/install_client.sh
packaging/tools/install_client.sh
+7
-7
packaging/tools/make_install.sh
packaging/tools/make_install.sh
+4
-4
packaging/tools/makeclient.sh
packaging/tools/makeclient.sh
+6
-6
packaging/tools/makepkg.sh
packaging/tools/makepkg.sh
+6
-6
packaging/tools/post.sh
packaging/tools/post.sh
+7
-7
未找到文件。
cmake/cmake.define
浏览文件 @
1fd294d1
...
...
@@ -115,18 +115,6 @@ ELSE ()
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_COVERAGE_COMPILE_FLAGS} ${GCC_COVERAGE_LINK_FLAGS}")
ENDIF ()
IF (${BUILD_SANITIZER})
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror -Werror=return-type -fPIC -gdwarf-2 -fsanitize=address -fsanitize=undefined -fsanitize-recover=all -fsanitize=float-divide-by-zero -fsanitize=float-cast-overflow -fno-sanitize=shift-base -fno-sanitize=alignment -g3 -Wformat=0")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-literal-suffix -Werror=return-type -fPIC -gdwarf-2 -fsanitize=address -fsanitize=undefined -fsanitize-recover=all -fsanitize=float-divide-by-zero -fsanitize=float-cast-overflow -fno-sanitize=shift-base -fno-sanitize=alignment -g3 -Wformat=0")
MESSAGE(STATUS "Compile with Address Sanitizer!")
ELSEIF (${BUILD_RELEASE})
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror -Werror=return-type -fPIC -O3 -Wformat=2 -Wno-format-nonliteral -Wno-format-truncation -Wno-format-y2k")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror -Wno-reserved-user-defined-literal -Wno-literal-suffix -Werror=return-type -fPIC -O3 -Wformat=2 -Wno-format-nonliteral -Wno-format-truncation -Wno-format-y2k")
ELSE ()
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror -Werror=return-type -fPIC -g3 -gdwarf-2 -Wformat=2 -Wno-format-nonliteral -Wno-format-truncation -Wno-format-y2k")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-reserved-user-defined-literal -g3 -Wno-literal-suffix -Werror=return-type -fPIC -gdwarf-2 -Wformat=2 -Wno-format-nonliteral -Wno-format-truncation -Wno-format-y2k")
ENDIF ()
# disable all assert
IF ((${DISABLE_ASSERT} MATCHES "true") OR (${DISABLE_ASSERTS} MATCHES "true"))
ADD_DEFINITIONS(-DDISABLE_ASSERT)
...
...
@@ -168,4 +156,20 @@ ELSE ()
MESSAGE(STATUS "SIMD instructions (FMA/AVX/AVX2) is ACTIVATED")
ENDIF()
# build mode
SET(CMAKE_C_FLAGS_REL "${CMAKE_C_FLAGS} -Werror -Werror=return-type -fPIC -O3 -Wformat=2 -Wno-format-nonliteral -Wno-format-truncation -Wno-format-y2k")
SET(CMAKE_CXX_FLAGS_REL "${CMAKE_CXX_FLAGS} -Werror -Wno-reserved-user-defined-literal -Wno-literal-suffix -Werror=return-type -fPIC -O3 -Wformat=2 -Wno-format-nonliteral -Wno-format-truncation -Wno-format-y2k")
IF (${BUILD_SANITIZER})
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror -Werror=return-type -fPIC -gdwarf-2 -fsanitize=address -fsanitize=undefined -fsanitize-recover=all -fsanitize=float-divide-by-zero -fsanitize=float-cast-overflow -fno-sanitize=shift-base -fno-sanitize=alignment -g3 -Wformat=0")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-literal-suffix -Werror=return-type -fPIC -gdwarf-2 -fsanitize=address -fsanitize=undefined -fsanitize-recover=all -fsanitize=float-divide-by-zero -fsanitize=float-cast-overflow -fno-sanitize=shift-base -fno-sanitize=alignment -g3 -Wformat=0")
MESSAGE(STATUS "Compile with Address Sanitizer!")
ELSEIF (${BUILD_RELEASE})
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS_REL}")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS_REL}")
ELSE ()
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror -Werror=return-type -fPIC -g3 -gdwarf-2 -Wformat=2 -Wno-format-nonliteral -Wno-format-truncation -Wno-format-y2k")
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-reserved-user-defined-literal -g3 -Wno-literal-suffix -Werror=return-type -fPIC -gdwarf-2 -Wformat=2 -Wno-format-nonliteral -Wno-format-truncation -Wno-format-y2k")
ENDIF ()
ENDIF ()
contrib/CMakeLists.txt
浏览文件 @
1fd294d1
...
...
@@ -229,7 +229,10 @@ endif(${BUILD_WITH_LEVELDB})
# To support rocksdb build on ubuntu: sudo apt-get install libgflags-dev
if
(
${
BUILD_WITH_ROCKSDB
}
)
if
(
${
TD_LINUX
}
)
SET
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-Wno-error=maybe-uninitialized -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=unused-function -Wno-errno=unused-private-field -Wno-error=unused-result"
)
SET
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS_REL
}
-Wno-error=maybe-uninitialized -Wno-error=unused-but-set-variable -Wno-error=unused-variable -Wno-error=unused-function -Wno-errno=unused-private-field -Wno-error=unused-result"
)
IF
(
"
${
CMAKE_BUILD_TYPE
}
"
STREQUAL
""
)
SET
(
CMAKE_BUILD_TYPE Release
)
endif
()
endif
(
${
TD_LINUX
}
)
MESSAGE
(
STATUS
"CXXXX STATUS CONFIG: "
${
CMAKE_CXX_FLAGS
}
)
...
...
@@ -253,7 +256,7 @@ if(${BUILD_WITH_ROCKSDB})
endif
(
${
TD_DARWIN
}
)
if
(
${
TD_WINDOWS
}
)
option
(
WITH_JNI
""
OFF
)
option
(
WITH_JNI
""
OFF
)
endif
(
${
TD_WINDOWS
}
)
if
(
${
TD_WINDOWS
}
)
...
...
@@ -485,6 +488,13 @@ endif(${BUILD_ADDR2LINE})
# geos
if
(
${
BUILD_GEOS
}
)
if
(
${
TD_LINUX
}
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS_REL
}
"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS_REL
}
"
)
IF
(
"
${
CMAKE_BUILD_TYPE
}
"
STREQUAL
""
)
SET
(
CMAKE_BUILD_TYPE Release
)
endif
()
endif
(
${
TD_LINUX
}
)
option
(
BUILD_SHARED_LIBS
"Build GEOS with shared libraries"
OFF
)
add_subdirectory
(
geos EXCLUDE_FROM_ALL
)
target_include_directories
(
...
...
packaging/deb/makedeb.sh
浏览文件 @
1fd294d1
...
...
@@ -124,12 +124,12 @@ if [ -f ${compile_dir}/build/bin/jemalloc-config ]; then
cp
${
compile_dir
}
/build/lib/libjemalloc.so.2
${
pkg_dir
}${
install_user_local_path
}
/lib/
ln
-sf
libjemalloc.so.2
${
pkg_dir
}${
install_user_local_path
}
/lib/libjemalloc.so
fi
if
[
-f
${
compile_dir
}
/build/lib/libjemalloc.a
]
;
then
cp
${
compile_dir
}
/build/lib/libjemalloc.a
${
pkg_dir
}${
install_user_local_path
}
/lib/
fi
if
[
-f
${
compile_dir
}
/build/lib/libjemalloc_pic.a
]
;
then
cp
${
compile_dir
}
/build/lib/libjemalloc_pic.a
${
pkg_dir
}${
install_user_local_path
}
/lib/
fi
#
if [ -f ${compile_dir}/build/lib/libjemalloc.a ]; then
#
cp ${compile_dir}/build/lib/libjemalloc.a ${pkg_dir}${install_user_local_path}/lib/
#
fi
#
if [ -f ${compile_dir}/build/lib/libjemalloc_pic.a ]; then
#
cp ${compile_dir}/build/lib/libjemalloc_pic.a ${pkg_dir}${install_user_local_path}/lib/
#
fi
if
[
-f
${
compile_dir
}
/build/lib/pkgconfig/jemalloc.pc
]
;
then
cp
${
compile_dir
}
/build/lib/pkgconfig/jemalloc.pc
${
pkg_dir
}${
install_user_local_path
}
/lib/pkgconfig/
fi
...
...
packaging/rpm/tdengine.spec
浏览文件 @
1fd294d1
...
...
@@ -123,12 +123,12 @@ if [ -f %{_compiledir}/build/bin/jemalloc-config ]; then
cp %{_compiledir}/build/lib/libjemalloc.so.2 %{buildroot}%{homepath}/jemalloc/lib
ln -sf libjemalloc.so.2 %{buildroot}%{homepath}/jemalloc/lib/libjemalloc.so
fi
if [ -f %{_compiledir}/build/lib/libjemalloc.a ]; then
cp %{_compiledir}/build/lib/libjemalloc.a %{buildroot}%{homepath}/jemalloc/lib
fi
if [ -f %{_compiledir}/build/lib/libjemalloc_pic.a ]; then
cp %{_compiledir}/build/lib/libjemalloc_pic.a %{buildroot}%{homepath}/jemalloc/lib
fi
#
if [ -f %{_compiledir}/build/lib/libjemalloc.a ]; then
#
cp %{_compiledir}/build/lib/libjemalloc.a %{buildroot}%{homepath}/jemalloc/lib
#
fi
#
if [ -f %{_compiledir}/build/lib/libjemalloc_pic.a ]; then
#
cp %{_compiledir}/build/lib/libjemalloc_pic.a %{buildroot}%{homepath}/jemalloc/lib
#
fi
if [ -f %{_compiledir}/build/lib/pkgconfig/jemalloc.pc ]; then
cp %{_compiledir}/build/lib/pkgconfig/jemalloc.pc %{buildroot}%{homepath}/jemalloc/lib/pkgconfig
fi
...
...
packaging/tools/install.sh
浏览文件 @
1fd294d1
...
...
@@ -315,13 +315,13 @@ function install_jemalloc() {
${
csudo
}
/usr/bin/install
-c
-m
755
${
jemalloc_dir
}
/lib/libjemalloc.so.2 /usr/local/lib
${
csudo
}
ln
-sf
libjemalloc.so.2 /usr/local/lib/libjemalloc.so
${
csudo
}
/usr/bin/install
-c
-d
/usr/local/lib
if
[
-f
${
jemalloc_dir
}
/lib/libjemalloc.a
]
;
then
${
csudo
}
/usr/bin/install
-c
-m
755
${
jemalloc_dir
}
/lib/libjemalloc.a /usr/local/lib
fi
if
[
-f
${
jemalloc_dir
}
/lib/libjemalloc_pic.a
]
;
then
${
csudo
}
/usr/bin/install
-c
-m
755
${
jemalloc_dir
}
/lib/libjemalloc_pic.a /usr/local/lib
fi
if
[
-f
${
jemalloc_dir
}
/lib/
libjemalloc_pic.a
]
;
then
#
if [ -f ${jemalloc_dir}/lib/libjemalloc.a ]; then
#
${csudo}/usr/bin/install -c -m 755 ${jemalloc_dir}/lib/libjemalloc.a /usr/local/lib
#
fi
#
if [ -f ${jemalloc_dir}/lib/libjemalloc_pic.a ]; then
#
${csudo}/usr/bin/install -c -m 755 ${jemalloc_dir}/lib/libjemalloc_pic.a /usr/local/lib
#
fi
if
[
-f
${
jemalloc_dir
}
/lib/
pkgconfig/jemalloc.pc
]
;
then
${
csudo
}
/usr/bin/install
-c
-d
/usr/local/lib/pkgconfig
${
csudo
}
/usr/bin/install
-c
-m
644
${
jemalloc_dir
}
/lib/pkgconfig/jemalloc.pc /usr/local/lib/pkgconfig
fi
...
...
packaging/tools/install_client.sh
浏览文件 @
1fd294d1
...
...
@@ -214,13 +214,13 @@ function install_jemalloc() {
${
csudo
}
/usr/bin/install
-c
-m
755
${
jemalloc_dir
}
/lib/libjemalloc.so.2 /usr/local/lib
${
csudo
}
ln
-sf
libjemalloc.so.2 /usr/local/lib/libjemalloc.so
${
csudo
}
/usr/bin/install
-c
-d
/usr/local/lib
if
[
-f
${
jemalloc_dir
}
/lib/libjemalloc.a
]
;
then
${
csudo
}
/usr/bin/install
-c
-m
755
${
jemalloc_dir
}
/lib/libjemalloc.a /usr/local/lib
fi
if
[
-f
${
jemalloc_dir
}
/lib/libjemalloc_pic.a
]
;
then
${
csudo
}
/usr/bin/install
-c
-m
755
${
jemalloc_dir
}
/lib/libjemalloc_pic.a /usr/local/lib
fi
if
[
-f
${
jemalloc_dir
}
/lib/
libjemalloc_pic.a
]
;
then
#
if [ -f ${jemalloc_dir}/lib/libjemalloc.a ]; then
#
${csudo}/usr/bin/install -c -m 755 ${jemalloc_dir}/lib/libjemalloc.a /usr/local/lib
#
fi
#
if [ -f ${jemalloc_dir}/lib/libjemalloc_pic.a ]; then
#
${csudo}/usr/bin/install -c -m 755 ${jemalloc_dir}/lib/libjemalloc_pic.a /usr/local/lib
#
fi
if
[
-f
${
jemalloc_dir
}
/lib/
pkgconfig/jemalloc.pc
]
;
then
${
csudo
}
/usr/bin/install
-c
-d
/usr/local/lib/pkgconfig
${
csudo
}
/usr/bin/install
-c
-m
644
${
jemalloc_dir
}
/lib/pkgconfig/jemalloc.pc /usr/local/lib/pkgconfig
fi
...
...
packaging/tools/make_install.sh
浏览文件 @
1fd294d1
...
...
@@ -241,10 +241,10 @@ function install_jemalloc() {
${
csudo
}
/usr/bin/install
-c
-m
755
${
binary_dir
}
/build/lib/libjemalloc.so.2 /usr/local/lib
${
csudo
}
ln
-sf
libjemalloc.so.2 /usr/local/lib/libjemalloc.so
>
/dev/null 2>&1
${
csudo
}
/usr/bin/install
-c
-d
/usr/local/lib
[
-f
${
binary_dir
}
/build/lib/libjemalloc.a
]
&&
${
csudo
}
/usr/bin/install
-c
-m
755
${
binary_dir
}
/build/lib/libjemalloc.a /usr/local/lib
[
-f
${
binary_dir
}
/build/lib/libjemalloc_pic.a
]
&&
${
csudo
}
/usr/bin/install
-c
-m
755
${
binary_dir
}
/build/lib/libjemalloc_pic.a /usr/local/lib
#
[ -f ${binary_dir}/build/lib/libjemalloc.a ] &&
#
${csudo}/usr/bin/install -c -m 755 ${binary_dir}/build/lib/libjemalloc.a /usr/local/lib
#
[ -f ${binary_dir}/build/lib/libjemalloc_pic.a ] &&
#
${csudo}/usr/bin/install -c -m 755 ${binary_dir}/build/lib/libjemalloc_pic.a /usr/local/lib
if
[
-f
"
${
binary_dir
}
/build/lib/pkgconfig/jemalloc.pc"
]
;
then
${
csudo
}
/usr/bin/install
-c
-d
/usr/local/lib/pkgconfig
${
csudo
}
/usr/bin/install
-c
-m
644
${
binary_dir
}
/build/lib/pkgconfig/jemalloc.pc
\
...
...
packaging/tools/makeclient.sh
浏览文件 @
1fd294d1
...
...
@@ -118,12 +118,12 @@ if [ -f ${build_dir}/bin/jemalloc-config ]; then
cp
${
build_dir
}
/lib/libjemalloc.so.2
${
install_dir
}
/jemalloc/lib
ln
-sf
libjemalloc.so.2
${
install_dir
}
/jemalloc/lib/libjemalloc.so
fi
if
[
-f
${
build_dir
}
/lib/libjemalloc.a
]
;
then
cp
${
build_dir
}
/lib/libjemalloc.a
${
install_dir
}
/jemalloc/lib
fi
if
[
-f
${
build_dir
}
/lib/libjemalloc_pic.a
]
;
then
cp
${
build_dir
}
/lib/libjemalloc_pic.a
${
install_dir
}
/jemalloc/lib
fi
#
if [ -f ${build_dir}/lib/libjemalloc.a ]; then
#
cp ${build_dir}/lib/libjemalloc.a ${install_dir}/jemalloc/lib
#
fi
#
if [ -f ${build_dir}/lib/libjemalloc_pic.a ]; then
#
cp ${build_dir}/lib/libjemalloc_pic.a ${install_dir}/jemalloc/lib
#
fi
if
[
-f
${
build_dir
}
/lib/pkgconfig/jemalloc.pc
]
;
then
cp
${
build_dir
}
/lib/pkgconfig/jemalloc.pc
${
install_dir
}
/jemalloc/lib/pkgconfig
fi
...
...
packaging/tools/makepkg.sh
浏览文件 @
1fd294d1
...
...
@@ -217,12 +217,12 @@ if [ -f ${build_dir}/bin/jemalloc-config ]; then
cp
${
build_dir
}
/lib/libjemalloc.so.2
${
install_dir
}
/jemalloc/lib
ln
-sf
libjemalloc.so.2
${
install_dir
}
/jemalloc/lib/libjemalloc.so
fi
if
[
-f
${
build_dir
}
/lib/libjemalloc.a
]
;
then
cp
${
build_dir
}
/lib/libjemalloc.a
${
install_dir
}
/jemalloc/lib
fi
if
[
-f
${
build_dir
}
/lib/libjemalloc_pic.a
]
;
then
cp
${
build_dir
}
/lib/libjemalloc_pic.a
${
install_dir
}
/jemalloc/lib
fi
#
if [ -f ${build_dir}/lib/libjemalloc.a ]; then
#
cp ${build_dir}/lib/libjemalloc.a ${install_dir}/jemalloc/lib
#
fi
#
if [ -f ${build_dir}/lib/libjemalloc_pic.a ]; then
#
cp ${build_dir}/lib/libjemalloc_pic.a ${install_dir}/jemalloc/lib
#
fi
if
[
-f
${
build_dir
}
/lib/pkgconfig/jemalloc.pc
]
;
then
cp
${
build_dir
}
/lib/pkgconfig/jemalloc.pc
${
install_dir
}
/jemalloc/lib/pkgconfig
fi
...
...
packaging/tools/post.sh
浏览文件 @
1fd294d1
...
...
@@ -169,13 +169,13 @@ function install_jemalloc() {
${
csudo
}
/usr/bin/install
-c
-m
755
${
jemalloc_dir
}
/lib/libjemalloc.so.2 /usr/local/lib
${
csudo
}
ln
-sf
libjemalloc.so.2 /usr/local/lib/libjemalloc.so
${
csudo
}
/usr/bin/install
-c
-d
/usr/local/lib
if
[
-f
${
jemalloc_dir
}
/lib/libjemalloc.a
]
;
then
${
csudo
}
/usr/bin/install
-c
-m
755
${
jemalloc_dir
}
/lib/libjemalloc.a /usr/local/lib
fi
if
[
-f
${
jemalloc_dir
}
/lib/libjemalloc_pic.a
]
;
then
${
csudo
}
/usr/bin/install
-c
-m
755
${
jemalloc_dir
}
/lib/libjemalloc_pic.a /usr/local/lib
fi
if
[
-f
${
jemalloc_dir
}
/lib/
libjemalloc_pic.a
]
;
then
#
if [ -f ${jemalloc_dir}/lib/libjemalloc.a ]; then
#
${csudo}/usr/bin/install -c -m 755 ${jemalloc_dir}/lib/libjemalloc.a /usr/local/lib
#
fi
#
if [ -f ${jemalloc_dir}/lib/libjemalloc_pic.a ]; then
#
${csudo}/usr/bin/install -c -m 755 ${jemalloc_dir}/lib/libjemalloc_pic.a /usr/local/lib
#
fi
if
[
-f
${
jemalloc_dir
}
/lib/
pkgconfig/jemalloc.pc
]
;
then
${
csudo
}
/usr/bin/install
-c
-d
/usr/local/lib/pkgconfig
${
csudo
}
/usr/bin/install
-c
-m
644
${
jemalloc_dir
}
/lib/pkgconfig/jemalloc.pc /usr/local/lib/pkgconfig
fi
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录