diff options
author | Arisotura <thetotalworm@gmail.com> | 2020-05-10 23:11:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-10 23:11:24 +0200 |
commit | bc9c989f61b0f7e346d7bd688b4af8480bd3264b (patch) | |
tree | ec8c8945e2ad7b85e5a1179f0f2e88d1a0f38c9e /src | |
parent | d3f14b7a8bcba9a71b7008a5b78abdfd4b70cb34 (diff) | |
parent | 5c5d280dd547958a37824809b7a038efbb3aee3b (diff) |
Merge pull request #621 from nadiaholmquist/fix/lto-ldflag
Add -flto as link flag, also fix missing <string> include in main.cpp causing the build to fail with GCC10
Diffstat (limited to 'src')
-rw-r--r-- | src/libui_sdl/libui/unix/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/libui_sdl/main.cpp | 1 |
2 files changed, 2 insertions, 1 deletions
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> |