Skip to content

Commit

Permalink
strip binaries to reduce dist size (#433)
Browse files Browse the repository at this point in the history
strip binaries to reduce dist size
  • Loading branch information
yyuuttaaoo authored Sep 27, 2022
1 parent cecd33f commit d8c2f82
Show file tree
Hide file tree
Showing 58 changed files with 147 additions and 62 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ clean:
rm -rf $(GENERATED_HOME)
rm -rf .testCoverage.txt
rm -rf .coretestCoverage.txt
rm -rf core/build
rm -rf plugin_main/*.dll
rm -rf plugin_main/*.so

Expand Down
15 changes: 7 additions & 8 deletions core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 2.9)
project(logtail)

# Options.
Expand Down Expand Up @@ -46,13 +46,12 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/common/Version.cpp.in ${VERSION_CPP_F

# Default C/CXX flags.
if (UNIX)
set(CMAKE_CXX_FLAGS "-Wno-error=deprecated-declarations -Wno-deprecated-declarations ")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -ggdb -Wall -fpic -fPIC -D_LARGEFILE64_SOURCE")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -g -ggdb -Wall -fpic -fPIC -D_LARGEFILE64_SOURCE")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -g -ggdb -O0 -Wall -fpic -fPIC -D_LARGEFILE64_SOURCE")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -std=c++11 -g -ggdb -O0 -Wall -fpic -fPIC -D_LARGEFILE64_SOURCE")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O2 -Wall -fpic -fPIC -D_LARGEFILE64_SOURCE")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -std=c++11 -O2 -Wall -fpic -fPIC -D_LARGEFILE64_SOURCE")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -g -ggdb -fpic -fPIC -D_LARGEFILE64_SOURCE")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -g -ggdb -fpic -fPIC -D_LARGEFILE64_SOURCE")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -O0")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0")
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O2")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2")
string(REPLACE "-O3" "" CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE}")
string(REPLACE "-O3" "" CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE}")
elseif (MSVC)
Expand Down
2 changes: 1 addition & 1 deletion core/aggregator/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 2.9)
project(aggregator)

file(GLOB LIB_SOURCE_FILES *.cpp *.h)
Expand Down
2 changes: 1 addition & 1 deletion core/app_config/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 2.9)
project(app_config)

file(GLOB LIB_SOURCE_FILES *.cpp *.h)
Expand Down
2 changes: 1 addition & 1 deletion core/checkpoint/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 2.9)
project(checkpoint)

file(GLOB LIB_SOURCE_FILES *.cpp *.h)
Expand Down
2 changes: 1 addition & 1 deletion core/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 2.9)
project(common)

file(GLOB LIB_SOURCE_FILES *.cpp *.h)
Expand Down
2 changes: 1 addition & 1 deletion core/config/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 2.9)
project(config)

if (MSVC)
Expand Down
2 changes: 1 addition & 1 deletion core/config_manager/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 2.9)
project(config_manager)

if (MSVC)
Expand Down
2 changes: 1 addition & 1 deletion core/controller/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 2.9)
project(controller)

file(GLOB LIB_SOURCE_FILES *.cpp *.h)
Expand Down
2 changes: 1 addition & 1 deletion core/event/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 2.9)
project(event)

file(GLOB LIB_SOURCE_FILES *.cpp *.h)
Expand Down
2 changes: 1 addition & 1 deletion core/event_handler/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 2.9)
project(event_handler)

file(GLOB LIB_SOURCE_FILES *.cpp *.h)
Expand Down
2 changes: 1 addition & 1 deletion core/event_listener/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 2.9)
project(event_listener)

if (UNIX)
Expand Down
2 changes: 1 addition & 1 deletion core/fuse/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 2.9)
project(fuse)

file(GLOB LIB_SOURCE_FILES *.cpp *.h .c)
Expand Down
2 changes: 1 addition & 1 deletion core/helper/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 2.9)
project(helper)

if (UNIX)
Expand Down
2 changes: 1 addition & 1 deletion core/log_pb/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 2.9)
project(log_pb)

file(GLOB LIB_SOURCE_FILES *.cc *.h *.cpp)
Expand Down
2 changes: 1 addition & 1 deletion core/logger/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 2.9)
project(logger)

file(GLOB LIB_SOURCE_FILES *.cpp *.h)
Expand Down
2 changes: 1 addition & 1 deletion core/monitor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 2.9)
project(monitor)

if (MSVC)
Expand Down
2 changes: 1 addition & 1 deletion core/observer/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 2.9)
project(observer)

file(GLOB_RECURSE LIB_SOURCE_FILES *.cpp *.h)
Expand Down
2 changes: 1 addition & 1 deletion core/observer/network/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 2.9)

add_subdirectory(protocols)
2 changes: 1 addition & 1 deletion core/observer/network/protocols/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 2.9)

add_subdirectory(dns)
add_subdirectory(http)
Expand Down
2 changes: 1 addition & 1 deletion core/observer/network/protocols/dns/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 2.9)

#set(CMAKE_CXX_STANDARD 11)
#set(CMAKE_CXX_FLAGS "-g")
Expand Down
2 changes: 1 addition & 1 deletion core/observer/network/protocols/http/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 2.9)

#set(CMAKE_CXX_STANDARD 11)
#set(CMAKE_CXX_FLAGS "-g")
Expand Down
2 changes: 1 addition & 1 deletion core/observer/network/protocols/mysql/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 2.9)

#set(CMAKE_CXX_STANDARD 11)
#set(CMAKE_CXX_FLAGS "-g")
Expand Down
2 changes: 1 addition & 1 deletion core/observer/network/protocols/pgsql/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 2.9)

#set(CMAKE_CXX_STANDARD 11)
#set(CMAKE_CXX_FLAGS "-g")
Expand Down
2 changes: 1 addition & 1 deletion core/observer/network/protocols/redis/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 2.9)

#set(CMAKE_CXX_STANDARD 11)
#set(CMAKE_CXX_FLAGS "-g")
Expand Down
2 changes: 1 addition & 1 deletion core/parser/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 2.9)
project(parser)

file(GLOB LIB_SOURCE_FILES *.cpp *.h)
Expand Down
2 changes: 1 addition & 1 deletion core/plugin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 2.9)
project(plugin)

file(GLOB LIB_SOURCE_FILES *.cpp *.h)
Expand Down
2 changes: 1 addition & 1 deletion core/polling/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 2.9)
project(polling)

file(GLOB LIB_SOURCE_FILES *.cpp *.h)
Expand Down
2 changes: 1 addition & 1 deletion core/processor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 2.9)
project(processor)

if (MSVC)
Expand Down
2 changes: 1 addition & 1 deletion core/profile_sender/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 2.9)
project(profile_sender)

file(GLOB LIB_SOURCE_FILES *.cpp *.h)
Expand Down
2 changes: 1 addition & 1 deletion core/profiler/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 2.9)
project(profiler)

file(GLOB LIB_SOURCE_FILES *.cpp *.h)
Expand Down
2 changes: 1 addition & 1 deletion core/reader/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 2.9)
project(reader)

if (MSVC)
Expand Down
2 changes: 1 addition & 1 deletion core/sdk/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 2.9)
project(sdk)

file(GLOB LIB_SOURCE_FILES *.cpp *.h)
Expand Down
2 changes: 1 addition & 1 deletion core/sender/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 2.9)
project(sender)

file(GLOB LIB_SOURCE_FILES *.cpp *.h)
Expand Down
2 changes: 1 addition & 1 deletion core/shennong/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 2.9)
project(shennong)

file(GLOB LIB_SOURCE_FILES *.cpp *.h)
Expand Down
2 changes: 1 addition & 1 deletion core/sls_control/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 2.9)
project(sls_control)

file(GLOB LIB_SOURCE_FILES *.cpp *.h)
Expand Down
2 changes: 1 addition & 1 deletion core/streamlog/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 2.9)
project(streamlog)

file(GLOB LIB_SOURCE_FILES *.cpp *.h)
Expand Down
2 changes: 1 addition & 1 deletion core/unittest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 2.9)
project(unittest_base)

add_definitions(-DAPSARA_UNIT_TEST_MAIN)
Expand Down
2 changes: 1 addition & 1 deletion core/unittest/app_config/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 2.9)
project(app_config_unittest)

add_executable(app_config_unittest AppConfigUnittest.cpp)
Expand Down
2 changes: 1 addition & 1 deletion core/unittest/checkpoint/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 2.9)
project(checkpoint_unittest)

add_executable(checkpoint_manager_unittest CheckpointManagerUnittest.cpp)
Expand Down
2 changes: 1 addition & 1 deletion core/unittest/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 2.9)
project(common_unittest)

add_executable(common_simple_utils_unittest SimpleUtilsUnittest.cpp
Expand Down
2 changes: 1 addition & 1 deletion core/unittest/config/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 2.9)
project(config_unittest)

add_executable(config_match_unittest ConfigMatchUnittest.cpp)
Expand Down
2 changes: 1 addition & 1 deletion core/unittest/config_sdk/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 2.9)
project(config_sdk_unittest)

add_executable(config_sdk_unittest config_sdk_unittest.cpp)
Expand Down
2 changes: 1 addition & 1 deletion core/unittest/controller/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 2.9)
project(controller_unittest)

add_executable(event_dispatcher_dir_unittest EventDispatcherDirUnittest.cpp)
Expand Down
2 changes: 1 addition & 1 deletion core/unittest/event/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

cmake_minimum_required(VERSION 2.8)
cmake_minimum_required(VERSION 2.9)
project(event_unittest)

add_executable(event_unittest EventUnittest.cpp)
Expand Down
Loading

0 comments on commit d8c2f82

Please sign in to comment.