aboutsummaryrefslogtreecommitdiff
path: root/depends/hosts/linux.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/linux.mk
parent9e4fbebcc8e497016563e46de4c64fa094edab2d (diff)
build: support LTO in depends
No Qt for now.
Diffstat (limited to 'depends/hosts/linux.mk')
-rw-r--r--depends/hosts/linux.mk6
1 files changed, 6 insertions, 0 deletions
diff --git a/depends/hosts/linux.mk b/depends/hosts/linux.mk
index 07da752492..5322520e6f 100644
--- a/depends/hosts/linux.mk
+++ b/depends/hosts/linux.mk
@@ -1,4 +1,10 @@
linux_CFLAGS=-pipe
+
+ifneq ($(LTO),)
+linux_CFLAGS += -flto
+linux_LDFLAGS += -flto
+endif
+
linux_CXXFLAGS=$(linux_CFLAGS)
linux_release_CFLAGS=-O2