Ignore ld.mold not found error during detection.

This commit is contained in:
Bartosz Taudul 2022-05-05 02:40:00 +02:00
parent de312c6cc7
commit 0a432ed349
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3
2 changed files with 2 additions and 2 deletions

View File

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

View File

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