From 318fe49c3101ab91310063be9b3e66ceaccb2dbd Mon Sep 17 00:00:00 2001 From: Andrew Noyes Date: Wed, 14 May 2025 19:55:29 -0400 Subject: [PATCH] gc sections on linux --- CMakeLists.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index cb2c46a..22a038d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,6 +33,9 @@ add_compile_options( if(CMAKE_SYSTEM_PROCESSOR STREQUAL x86_64) add_compile_options(-mavx) endif() +if(CMAKE_SYSTEM_NAME STREQUAL Linux) + add_link_options(LINKER:--gc-sections) +endif() add_subdirectory(third_party)