Pārlūkot izejas kodu

cmake: Correctly split/gc sections while linking

Repeat the flags while linking for LTO
Yuri D'Elia 2 gadi atpakaļ
vecāks
revīzija
0ac4130b7d
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      CMakeLists.txt

+ 1 - 1
CMakeLists.txt

@@ -267,7 +267,7 @@ if(CMAKE_CROSSCOMPILING)
 
     # split and gc sections
     add_compile_options(-ffunction-sections -fdata-sections)
-    add_link_options(-Wl,--gc-sections)
+    add_link_options(-ffunction-sections -fdata-sections -Wl,--gc-sections)
 
     # LTO (with custom options)
     add_compile_options(-flto -fno-fat-lto-objects)