29 lines
951 B
Diff
29 lines
951 B
Diff
|
|
From f977aeddbf2283a856bf5bb738f3e119bc0fe087 Mon Sep 17 00:00:00 2001
|
||
|
|
From: leeffo <liweiganga@uniontech.com>
|
||
|
|
Date: Mon, 24 Jul 2023 18:15:35 +0800
|
||
|
|
Subject: [PATCH 2/2] Remove all symbol table and relocation information from
|
||
|
|
the executable
|
||
|
|
|
||
|
|
---
|
||
|
|
CMakeLists.txt | 4 ++--
|
||
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||
|
|
|
||
|
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||
|
|
index f9f71cd..16330d1 100644
|
||
|
|
--- a/CMakeLists.txt
|
||
|
|
+++ b/CMakeLists.txt
|
||
|
|
@@ -22,8 +22,8 @@ else()
|
||
|
|
# -Wl, -O2 Enable linker optimizations
|
||
|
|
# -Wl, --gc-sections Remove unused code resulting from -fdsta-sections and
|
||
|
|
# -ffunction-sections
|
||
|
|
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -O2 -Wl,--gc-sections")
|
||
|
|
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -O2 -Wl,--gc-sections")
|
||
|
|
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -O2 -Wl,--gc-sections -s ")
|
||
|
|
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -O2 -Wl,--gc-sections -s")
|
||
|
|
endif()
|
||
|
|
|
||
|
|
#是否开启Wayland编译
|
||
|
|
--
|
||
|
|
2.20.1
|
||
|
|
|