Skip to content

Commit

Permalink
Add LTO for best optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
lotharsm committed Jan 16, 2021
1 parent a53d883 commit 791b4e1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions builds/snap/snapcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ parts:
plugin: autotools
source: https://github.com/EasyRPG/liblcf
source-type: git
build-environment:
- CXXFLAGS: "$CXXFLAGS -fuse-ld=gold -flto=$(nproc) -ffunction-sections -fdata-sections"
- LDFLAGS: "$LDFLAGS -fuse-ld=gold -flto=$(nproc) -Wl,--gc-sections"
autotools-configure-parameters:
- --prefix=/usr
- --disable-static
Expand Down Expand Up @@ -117,6 +120,9 @@ parts:
plugin: cmake
source: https://github.com/Mindwerks/wildmidi
source-type: git
build-environment:
- CXXFLAGS: "$CXXFLAGS -fuse-ld=gold -flto=$(nproc) -ffunction-sections -fdata-sections"
- LDFLAGS: "$LDFLAGS -fuse-ld=gold -flto=$(nproc) -Wl,--gc-sections"
cmake-parameters:
- -DCMAKE_BUILD_TYPE=Release
- -DBUILD_SHARED_LIBS=ON
Expand Down

0 comments on commit 791b4e1

Please sign in to comment.