LTO + lld wants the compiler to be clang.

This commit is contained in:
Bartosz Taudul 2022-04-27 02:33:22 +02:00
parent b10c83f358
commit afd4cdec63
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -2,12 +2,12 @@ ARCH := $(shell uname -m)
ifeq (0,$(shell $(CC) --version | grep clang && echo 1 || echo 0))
CFLAGS += -s
else
ifeq (1,$(shell ld.lld --version > /dev/null && echo 1 || echo 0))
LDFLAGS := -s -fuse-ld=lld
else
LDFLAGS := -s
endif
ifeq (1,$(shell ld.lld --version > /dev/null && echo 1 || echo 0))
LDFLAGS += -fuse-ld=lld
endif
ifneq (,$(filter $(ARCH),aarch64 arm64))