The mold linker is not recognized by gcc.

This commit is contained in:
Bartosz Taudul 2022-04-28 22:51:56 +02:00
parent 3bc42faeb3
commit 31b3212f76
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3

View File

@ -1,7 +1,9 @@
ARCH := $(shell uname -m)
ifeq (1,$(shell ld.mold --version > /dev/null && echo 1 || echo 0))
LDFLAGS += -fuse-ld=mold
ifeq (1,$(shell $(CC) --version | grep clang > /dev/null && echo 1 || echo 0))
ifeq (1,$(shell ld.mold --version > /dev/null && echo 1 || echo 0))
LDFLAGS := -fuse-ld=mold
endif
endif
ifeq ($(ARCH),x86_64)