Use lld linker, if available.

This commit is contained in:
Bartosz Taudul 2022-04-27 02:17:16 +02:00
parent 7f44eba2e9
commit b10c83f358
No known key found for this signature in database
GPG Key ID: B7FE2008B7575DF3
7 changed files with 18 additions and 30 deletions

View File

@ -1,11 +1,6 @@
ARCH := $(shell uname -m)
CFLAGS := -g3 -Wall
DEFINES := -DDEBUG
BUILD := debug
ifeq ($(ARCH),x86_64)
CFLAGS += -msse4.1
endif
include ../../../common/unix-debug.mk
include build.mk

9
common/unix-debug.mk Normal file
View File

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

View File

@ -6,6 +6,10 @@ else
LDFLAGS := -s
endif
ifeq (1,$(shell ld.lld --version > /dev/null && echo 1 || echo 0))
LDFLAGS += -fuse-ld=lld
endif
ifneq (,$(filter $(ARCH),aarch64 arm64))
CFLAGS += -mcpu=native
else

View File

@ -1,11 +1,6 @@
ARCH := $(shell uname -m)
CFLAGS := -g3 -Wall
DEFINES := -DDEBUG
BUILD := debug
ifeq ($(ARCH),x86_64)
CFLAGS += -msse4.1
endif
include ../../../common/unix-debug.mk
include build.mk

View File

@ -1,11 +1,6 @@
ARCH := $(shell uname -m)
CFLAGS := -g3 -Wall
DEFINES := -DDEBUG
BUILD := debug
ifeq ($(ARCH),x86_64)
CFLAGS += -msse4.1
endif
include ../../../common/unix-debug.mk
include build.mk

View File

@ -1,11 +1,6 @@
ARCH := $(shell uname -m)
CFLAGS := -g3 -Wall
DEFINES := -DDEBUG
BUILD := debug
ifeq ($(ARCH),x86_64)
CFLAGS += -msse4.1
endif
include ../../../common/unix-debug.mk
include build.mk

View File

@ -1,11 +1,6 @@
ARCH := $(shell uname -m)
CFLAGS := -g3 -Wall
DEFINES := -DDEBUG
BUILD := debug
ifeq ($(ARCH),x86_64)
CFLAGS += -msse4.1
endif
include ../../../common/unix-debug.mk
include build.mk