Skip to content

Commit

Permalink
enable lto
Browse files Browse the repository at this point in the history
  • Loading branch information
CyanoHao committed Apr 2, 2021
1 parent f3e94b4 commit 0138673
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.12) # C++20 requires 3.12
cmake_minimum_required(VERSION 3.12)
project(WFM_all)
include(CheckLibraryExists)

Expand Down
2 changes: 1 addition & 1 deletion package/dev.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

cmake . -B build/ \
-DCMAKE_BUILD_TYPE="Release"
-DCMAKE_BUILD_TYPE="RelWithDebugInfo"
cmake --build build/ -j$(nproc)

source build/config/config.sh
Expand Down
1 change: 1 addition & 0 deletions package/linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

cmake . -B build/ \
-DCMAKE_BUILD_TYPE="Release" \
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION:BOOL="ON" \
-DCMAKE_C_COMPILER="x86_64-gentoo-linux-musl-gcc" \
-DCMAKE_C_FLAGS="-static-pie -s" \
-DCMAKE_CXX_COMPILER="x86_64-gentoo-linux-musl-g++" \
Expand Down
1 change: 1 addition & 0 deletions package/mac.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

cmake . -B build/ \
-DCMAKE_BUILD_TYPE="Release" \
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION:BOOL="ON" \
-DCMAKE_C_COMPILER="clang" \
-DCMAKE_C_FLAGS="-arch x86_64 -arch arm64" \
-DCMAKE_CXX_COMPILER="clang++" \
Expand Down
1 change: 1 addition & 0 deletions package/win32.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

cmake . -B build/ \
-DCMAKE_BUILD_TYPE="Release" \
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION:BOOL="ON" \
-DCMAKE_C_COMPILER="i686-w64-mingw32-gcc" \
-DCMAKE_C_FLAGS="-static -s -Wl,--large-address-aware" \
-DCMAKE_CXX_COMPILER="i686-w64-mingw32-g++" \
Expand Down
1 change: 1 addition & 0 deletions package/winarm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

cmake . -B build/ -G "MinGW Makefiles" \
-DCMAKE_BUILD_TYPE="Release" \
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION:BOOL="ON" \
-DCMAKE_C_COMPILER="aarch64-w64-mingw32-clang" \
-DCMAKE_C_FLAGS="-static -s" \
-DCMAKE_CXX_COMPILER="aarch64-w64-mingw32-clang++" \
Expand Down
1 change: 1 addition & 0 deletions package/winx86.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

cmake . -B build/ \
-DCMAKE_BUILD_TYPE="Release" \
-DCMAKE_INTERPROCEDURAL_OPTIMIZATION:BOOL="ON" \
-DCMAKE_C_COMPILER="x86_64-w64-mingw32-gcc" \
-DCMAKE_C_FLAGS="-static -s" \
-DCMAKE_CXX_COMPILER="x86_64-w64-mingw32-g++" \
Expand Down

0 comments on commit 0138673

Please sign in to comment.