From 49521008172e2ca0ca44263dc2c5369c939cde13 Mon Sep 17 00:00:00 2001 From: Mikael Simberg Date: Thu, 6 Jun 2024 11:24:00 +0200 Subject: [PATCH] Test -f{data,function}-sections and --gc-sections --- cmake/DLAF_AddTargetWarnings.cmake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmake/DLAF_AddTargetWarnings.cmake b/cmake/DLAF_AddTargetWarnings.cmake index d2aa62084a..b3217351ae 100644 --- a/cmake/DLAF_AddTargetWarnings.cmake +++ b/cmake/DLAF_AddTargetWarnings.cmake @@ -17,6 +17,12 @@ macro(target_add_warnings target_name) set(IS_COMPILER_GCC $) set(IS_CUDA_NVCC $) + target_compile_options(${target_name} + PRIVATE -ffunction-sections + -fdata-sections + -Wl,--gc-sections + ) + target_compile_options( ${target_name} PRIVATE -Wall