diff options
-rw-r--r-- | CMakeLists.txt | 1 | ||||
-rw-r--r-- | src/libui_sdl/libui/unix/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/libui_sdl/main.cpp | 1 |
3 files changed, 3 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 048dd44..e3f9cb6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,6 +22,7 @@ endif() if(ENABLE_LTO) add_compile_options(-O3 -flto) + add_link_options(-flto) set(CMAKE_AR "gcc-ar") set(CMAKE_C_ARCHIVE_CREATE "<CMAKE_AR> qcs <TARGET> <LINK_FLAGS> <OBJECTS>") set(CMAKE_C_ARCHIVE_FINISH true) diff --git a/src/libui_sdl/libui/unix/CMakeLists.txt b/src/libui_sdl/libui/unix/CMakeLists.txt index c69081e..39f6c0a 100644 --- a/src/libui_sdl/libui/unix/CMakeLists.txt +++ b/src/libui_sdl/libui/unix/CMakeLists.txt @@ -65,7 +65,7 @@ macro(_handle_static) OUTPUT ${_oname} DEPENDS ${_LIBUINAME} COMMAND - ld -r --whole-archive ${_aname} -o ${_oname} + ${CMAKE_LINKER} -r --whole-archive ${_aname} -o ${_oname} COMMAND objcopy --localize-hidden ${_oname} COMMENT "Removing hidden symbols") diff --git a/src/libui_sdl/main.cpp b/src/libui_sdl/main.cpp index 9dea9f1..80b8665 100644 --- a/src/libui_sdl/main.cpp +++ b/src/libui_sdl/main.cpp @@ -20,6 +20,7 @@ #include <time.h> #include <stdio.h> #include <string.h> +#include <string> #ifndef __WIN32__ #include <glib.h> |