OCaml 4.14.0 rebuild
[arch-packages.git] / pacman / trunk / add-flto-to-LDFLAGS-for-clang.patch
blobb3c139de4d3c1f066de2134a0620e0b724d2bca2
1 From 26ee6ff6adbcd8560ec3a65cf219d2ab98edb804 Mon Sep 17 00:00:00 2001
2 From: Allan McRae <allan@archlinux.org>
3 Date: Fri, 24 Dec 2021 17:59:32 +1000
4 Subject: [PATCH] LTO: Add -flto to LDFLAGS for clang
6 GCC automatically detects when it is linking LTO objects, but clang does
7 not. Add -flto to LDFLAGS to make this work for clang too.
9 Signed-off-by: Allan McRae <allan@archlinux.org>
10 ---
11 scripts/libmakepkg/buildenv/lto.sh.in | 1 +
12 1 file changed, 1 insertion(+)
14 diff --git a/scripts/libmakepkg/buildenv/lto.sh.in b/scripts/libmakepkg/buildenv/lto.sh.in
15 index 1f1ca53f..c3bd0fa4 100644
16 --- a/scripts/libmakepkg/buildenv/lto.sh.in
17 +++ b/scripts/libmakepkg/buildenv/lto.sh.in
18 @@ -33,5 +33,6 @@ buildenv_lto() {
19 if check_option "lto" "y"; then
20 CFLAGS+=" -flto"
21 CXXFLAGS+=" -flto"
22 + LDFLAGS+=" -flto"