Use mold for even faster linking.

This commit is contained in:
Bartosz Taudul 2022-04-27 18:20:36 +02:00
parent d71ecd5271
commit 7d80c088fc
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3
2 changed files with 4 additions and 4 deletions

View File

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

View File

@ -3,8 +3,8 @@ 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)) ifeq (1,$(shell ld.mold --version > /dev/null && echo 1 || echo 0))
LDFLAGS := -s -fuse-ld=lld LDFLAGS := -s -fuse-ld=mold
else else
LDFLAGS := -s LDFLAGS := -s
endif endif