You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2022/10/10 00:31:45 UTC
[doris] branch master updated: [chore](release build) copy license and notice file to output folder and strip debug info from meta tool (#13222)
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 15c7c0b754 [chore](release build) copy license and notice file to output folder and strip debug info from meta tool (#13222)
15c7c0b754 is described below
commit 15c7c0b7542ae80fe385f3daffcee8df7d10b0f4
Author: yiguolei <67...@qq.com>
AuthorDate: Mon Oct 10 08:31:34 2022 +0800
[chore](release build) copy license and notice file to output folder and strip debug info from meta tool (#13222)
* [chore](release build) copy license and notice file to output folder and strip debug info from meta tool
Co-authored-by: yiguolei <yi...@gmail.com>
---
be/src/tools/CMakeLists.txt | 16 ++++++----------
build.sh | 10 ++++++++++
2 files changed, 16 insertions(+), 10 deletions(-)
diff --git a/be/src/tools/CMakeLists.txt b/be/src/tools/CMakeLists.txt
index a3d2890135..b8d0febfdf 100644
--- a/be/src/tools/CMakeLists.txt
+++ b/be/src/tools/CMakeLists.txt
@@ -35,13 +35,9 @@ target_link_libraries(meta_tool
install(DIRECTORY DESTINATION ${OUTPUT_DIR}/lib/)
install(TARGETS meta_tool DESTINATION ${OUTPUT_DIR}/lib/)
-if (${STRIP_DEBUG_INFO} STREQUAL "ON")
- add_custom_command(TARGET meta_tool POST_BUILD
- COMMAND ${CMAKE_OBJCOPY} --only-keep-debug $<TARGET_FILE:meta_tool> $<TARGET_FILE:meta_tool>.dbg
- COMMAND ${CMAKE_STRIP} --strip-debug --strip-unneeded $<TARGET_FILE:meta_tool>
- COMMAND ${CMAKE_OBJCOPY} --add-gnu-debuglink=$<TARGET_FILE:meta_tool>.dbg $<TARGET_FILE:meta_tool>
- )
-
- install(DIRECTORY DESTINATION ${OUTPUT_DIR}/lib/debug_info/)
- install(FILES $<TARGET_FILE:meta_tool>.dbg DESTINATION ${OUTPUT_DIR}/lib/debug_info/)
-endif()
+# Meta tool never need debug info
+add_custom_command(TARGET meta_tool POST_BUILD
+ COMMAND ${CMAKE_OBJCOPY} --only-keep-debug $<TARGET_FILE:meta_tool> $<TARGET_FILE:meta_tool>.dbg
+ COMMAND ${CMAKE_STRIP} --strip-debug --strip-unneeded $<TARGET_FILE:meta_tool>
+ COMMAND ${CMAKE_OBJCOPY} --add-gnu-debuglink=$<TARGET_FILE:meta_tool>.dbg $<TARGET_FILE:meta_tool>
+ )
\ No newline at end of file
diff --git a/build.sh b/build.sh
index 54cf674cbc..ecbc956754 100755
--- a/build.sh
+++ b/build.sh
@@ -97,6 +97,13 @@ clean_fe() {
popd
}
+# Copy the common files like licenses, notice.txt to output folder
+function copy_common_files() {
+ cp -r -p "${DORIS_HOME}/NOTICE.txt" "$1/"
+ cp -r -p "${DORIS_HOME}/dist/LICENSE-dist.txt" "$1/"
+ cp -r -p "${DORIS_HOME}/dist/licenses" "$1/"
+}
+
if ! OPTS="$(getopt \
-n "$0" \
-o '' \
@@ -446,6 +453,7 @@ if [[ "${BUILD_FE}" -eq 1 ]]; then
cp -r -p "${DORIS_HOME}/webroot/static" "${DORIS_OUTPUT}/fe/webroot"/
cp -r -p "${DORIS_THIRDPARTY}/installed/webroot"/* "${DORIS_OUTPUT}/fe/webroot/static"/
+ copy_common_files "${DORIS_OUTPUT}/fe/"
mkdir -p "${DORIS_OUTPUT}/fe/log"
mkdir -p "${DORIS_OUTPUT}/fe/doris-meta"
fi
@@ -491,6 +499,7 @@ if [[ "${BUILD_BE}" -eq 1 ]]; then
fi
cp -r -p "${DORIS_THIRDPARTY}/installed/webroot"/* "${DORIS_OUTPUT}/be/www"/
+ copy_common_files "${DORIS_OUTPUT}/be/"
mkdir -p "${DORIS_OUTPUT}/be/log"
mkdir -p "${DORIS_OUTPUT}/be/storage"
fi
@@ -502,6 +511,7 @@ if [[ "${BUILD_BROKER}" -eq 1 ]]; then
./build.sh
rm -rf "${DORIS_OUTPUT}/apache_hdfs_broker"/*
cp -r -p "${DORIS_HOME}/fs_brokers/apache_hdfs_broker/output/apache_hdfs_broker"/* "${DORIS_OUTPUT}/apache_hdfs_broker"/
+ copy_common_files "${DORIS_OUTPUT}/apache_hdfs_broker/"
cd "${DORIS_HOME}"
fi
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org