dash/depends/hosts
laanwj 685b7a7a1b
Merge bitcoin/bitcoin#23611: build: add LTO option to depends
094772656d71b3f5022ae292094e878da035de9e build: support LTO in depends (fanquake)

Pull request description:

  This adds an `LTO` option to depends, i.e `make -C depends LTO=1`, which passes `-flto` when building packages (not currently qt), and automatically configures with `--enable-lto` when doing a build using a `CONFIG_SITE`.

  The following tables comapres the size (in bytes) of the stripped `x86_64` Linux binaries produced with master and this PR (full depends build):

  | Binary | stripped master | stripped LTO=1 | saving |
  | -------- | ----------------: | -------------: | --------: |
  | bitcoin-cli | 1178632 | 469872 | 60% |
  | bitcoin-tx  | 2710584 | 1866504 | 31% |
  | bitcoin-util | 952880 | 240104 | 74% |
  | bitcoin-wallet | 7992888 | 5365984 | 32% |
  | bitcoind | 13421336 | 11868592 | 12% |
  | bitcoin-qt | 37680496 | 31640976 | 16% |

ACKs for top commit:
  laanwj:
    Tested ACK 094772656d71b3f5022ae292094e878da035de9e

Tree-SHA512: 6b8483ea490e57a153105ad8c38b25fb1af5d55b1af22db398c7c2573612aaf71b4d2b4cf09c18fd6331b1358dba01641eeaa03e5018a925392e1937118d984a
2024-09-27 12:52:15 -05:00
..
android.mk Merge bitcoin/bitcoin#23611: build: add LTO option to depends 2024-09-27 12:52:15 -05:00
darwin.mk Merge bitcoin/bitcoin#23611: build: add LTO option to depends 2024-09-27 12:52:15 -05:00
default.mk merge bitcoin#18820: Propagate well-known vars into depends 2021-08-28 00:42:02 +05:30
freebsd.mk Merge bitcoin/bitcoin#23611: build: add LTO option to depends 2024-09-27 12:52:15 -05:00
linux.mk Merge bitcoin/bitcoin#23611: build: add LTO option to depends 2024-09-27 12:52:15 -05:00
mingw32.mk Merge bitcoin/bitcoin#23611: build: add LTO option to depends 2024-09-27 12:52:15 -05:00
netbsd.mk Merge bitcoin/bitcoin#23611: build: add LTO option to depends 2024-09-27 12:52:15 -05:00
openbsd.mk Merge bitcoin/bitcoin#23611: build: add LTO option to depends 2024-09-27 12:52:15 -05:00