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

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