summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--cmake/mingw-w64.cmake7
1 files changed, 4 insertions, 3 deletions
diff --git a/cmake/mingw-w64.cmake b/cmake/mingw-w64.cmake
index e4f149b0..1566eac0 100644
--- a/cmake/mingw-w64.cmake
+++ b/cmake/mingw-w64.cmake
@@ -40,10 +40,11 @@ set(fpu "-ffast-math -mfpmath=both -mstackrealign -ftree-vectorize -falign-funct
set(cpu "-O3 -pipe -march=pentium4 -mtune=corei7-avx -msse -msse2 -mno-sse3 -mno-avx -frename-registers -fno-PIC")
set(lto "-flto -fuse-linker-plugin -flto-compression-level=9 -flto-partition=none -fipa-icf -fipa-pta -flto-odr-type-merging")
set(bloat "-fno-exceptions -fno-rtti")
+set(sections "-ffunction-sections -fdata-sections")
-set(_CFLAGS " -fvisibility=hidden")
-set(_CXXFLAGS "${_CFLAGS}")
-set(_CFLAGS_RELEASE "-s ${cpu} ${fpu} ${lto} ${bloat}")
+set(_CFLAGS "-fvisibility=hidden")
+set(_CXXFLAGS "${bloat} ${_CFLAGS}")
+set(_CFLAGS_RELEASE "-s ${cpu} ${fpu} ${lto} ${sections}")
set(_CFLAGS_DEBUG "-g -O0 -fstack-protector-strong")
set(_CXXFLAGS_RELEASE "${_CFLAGS_RELEASE}")
set(_CXXFLAGS_DEBUG "${_CFLAGS_DEBUG}")