Skip to content

Commit

Permalink
The mold linker is not recognized by gcc.
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfpld committed Apr 29, 2022
1 parent 3bc42fa commit 31b3212
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions common/unix-debug.mk
Original file line number Diff line number Diff line change
@@ -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)
Expand Down

0 comments on commit 31b3212

Please sign in to comment.