summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortongzongzhen <[email protected]>2024-07-23 18:18:31 +0800
committertongzongzhen <[email protected]>2024-07-23 18:18:31 +0800
commitd07ad2758d189b6613ee2fe98ca432423b1232cf (patch)
treef932221d92c6a9169f9e77d5fea571c14fa13f89
parent2590538a50fea1899953b7845a4f6673ac5d0b8d (diff)
Fix conflict between --wrap and ltov4.8.17-20240723
-rw-r--r--CMakeLists.txt3
-rw-r--r--app/CMakeLists.txt3
-rw-r--r--service/CMakeLists.txt1
3 files changed, 3 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 85d7d71..ded67fc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -42,9 +42,6 @@ endif()
set(CMAKE_C_FLAGS "-std=gnu99 -m64 -march=${MACHINE} -fPIC -Wall -Wno-format-truncation")
set(CMAKE_CXX_FLAGS "-std=gnu++11 -m64 -march=${MACHINE} -fPIC -Wall -Wno-format-truncation")
-# enable LTO
-set(CMAKE_INTERPROCEDURAL_OPTIMIZATION True)
-
# Force -O3 for release and relwithdebinfo
#string(REPLACE "-O2" "-O3" CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
#string(REPLACE "-O2" "-O3" CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
diff --git a/app/CMakeLists.txt b/app/CMakeLists.txt
index 6bdb576..6055acd 100644
--- a/app/CMakeLists.txt
+++ b/app/CMakeLists.txt
@@ -7,7 +7,8 @@ include_directories(include)
include_directories(../service/include)
add_library(marsio SHARED src/marsio.c src/rawio.c src/mrb.c
src/sendpath.c src/monit.c src/tap.c src/dp_trace.c)
-
+
+set_target_properties(marsio PROPERTIES INTERPROCEDURAL_OPTIMIZATION TRUE)
set_target_properties(marsio PROPERTIES VERSION ${MARSIO_VERSION_MAJOR}.${MARSIO_VERSION_MINOR})
set_target_properties(marsio PROPERTIES SOVERSION ${MARSIO_VERSION_MAJOR})
set_target_properties(marsio PROPERTIES LINK_FLAGS "-Wl,--version-script=${CMAKE_CURRENT_LIST_DIR}/src/version.map")
diff --git a/service/CMakeLists.txt b/service/CMakeLists.txt
index 1db8a7c..e7abd05 100644
--- a/service/CMakeLists.txt
+++ b/service/CMakeLists.txt
@@ -9,6 +9,7 @@ set(MRZCPD_SERVICE_SOURCE_FILES src/core.c src/devmgr.c src/mrb.c src/hwinfo.c s
src/http_serv.c src/classifier_rule_parser.c src/mpack.c src/dp_trace.c src/node_link_aware_injector.c)
add_executable(mrzcpd src/main.c ${MRZCPD_SERVICE_SOURCE_FILES})
+set_target_properties(mrzcpd PROPERTIES INTERPROCEDURAL_OPTIMIZATION TRUE)
target_link_libraries(mrzcpd MESA_prof_load_static libdpdk ${SYSTEMD_LIBRARIES})
target_link_libraries(mrzcpd rt pthread dl infra z elf)
target_include_directories(mrzcpd INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/include/")