Explorar o código

cmake: Correctly split/gc sections while linking

Repeat the flags while linking for LTO
Yuri D'Elia %!s(int64=2) %!d(string=hai) anos
pai
achega
0ac4130b7d
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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)