From 094772656d71b3f5022ae292094e878da035de9e Mon Sep 17 00:00:00 2001 From: fanquake Date: Tue, 16 Nov 2021 10:01:38 +0800 Subject: build: support LTO in depends No Qt for now. --- depends/hosts/darwin.mk | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'depends/hosts/darwin.mk') 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 -- cgit v1.2.3