aboutsummaryrefslogtreecommitdiff
path: root/depends/hosts/darwin.mk
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2021-11-16 10:01:38 +0800
committerfanquake <fanquake@gmail.com>2022-06-14 12:08:27 +0100
commit094772656d71b3f5022ae292094e878da035de9e (patch)
tree25e0ef7721c5dc5a4970324a48f892141d8c3541 /depends/hosts/darwin.mk
parent9e4fbebcc8e497016563e46de4c64fa094edab2d (diff)
downloadbitcoin-094772656d71b3f5022ae292094e878da035de9e.tar.xz
build: support LTO in depends
No Qt for now.
Diffstat (limited to 'depends/hosts/darwin.mk')
-rw-r--r--depends/hosts/darwin.mk6
1 files changed, 6 insertions, 0 deletions
diff --git a/depends/hosts/darwin.mk b/depends/hosts/darwin.mk
index bf9b7625f2..a564613cb6 100644
--- a/depends/hosts/darwin.mk
+++ b/depends/hosts/darwin.mk
@@ -110,6 +110,12 @@ darwin_CXX=env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH \
-Xclang -internal-externc-isystem$(OSX_SDK)/usr/include
darwin_CFLAGS=-pipe
+
+ifneq ($(LTO),)
+darwin_CFLAGS += -flto
+darwin_LDFLAGS += -flto
+endif
+
darwin_CXXFLAGS=$(darwin_CFLAGS)
darwin_release_CFLAGS=-O2