diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2016-08-14 12:53:05 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2016-08-14 12:53:05 +0200 |
commit | 7e859a41b16e75ed3b96255aec45c72f716c0328 (patch) | |
tree | 0f28313fc45928bd95f0c8b09309fefccc6f11de /cmake | |
parent | 0256106cfbeb373899bdb134bac788898b902283 (diff) |
cmake/mingw-w64: debloat flags are relevant only for c++
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/mingw-w64.cmake | 7 |
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}") |