Skip to content

Commit 6dda3eb

Browse files
committed
Only do LTO for publish builds to allow for one run to finish quickly
This helps give faster feedbacks when something broke.
1 parent 90e91d4 commit 6dda3eb

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

.github/workflows/ci-macvim.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,12 @@ jobs:
137137
sed -i.bak -f ci/config.mk.clang-12.sed src/auto/config.mk
138138
fi
139139
140+
if ${{ matrix.publish == true }}; then
141+
# Only do link-time optimizations for publish builds, so the other
142+
# ones can still finish quickly to give quick feedbacks.
143+
sed -i.bak -f ci/config.mk.lto.sed src/auto/config.mk
144+
fi
145+
140146
- name: Modify configure result
141147
if: matrix.publish
142148
run: |

ci/config.mk.lto.sed

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Add link-time optimization for even better performance
2+
/^CFLAGS[[:blank:]]*=/s/$/ -flto/
3+
/^LDFLAGS[[:blank:]]*=/s/$/ -flto/

0 commit comments

Comments
 (0)