1
1
mirror of https://github.com/rui314/mold.git synced 2024-11-13 09:39:13 +03:00

Add "make LTO=1" to enable LTO build

This commit is contained in:
Rui Ueyama 2021-04-05 22:51:15 +09:00
parent 87dcaf097e
commit 2e37f3c040

View File

@ -29,6 +29,12 @@ ifeq ($(STATIC), 1)
LDFLAGS += -static
endif
LTO ?= 0
ifeq ($(LTO), 1)
CPPFLAGS += -O3 -flto
LDFLAGS += -flto
endif
all: mold mold-wrapper.so
mold: $(OBJS)