diff options
author | Bartosz Taudul <wolf@nereid.pl> | 2022-04-27 03:17:16 +0300 |
---|---|---|
committer | Bartosz Taudul <wolf@nereid.pl> | 2022-04-27 03:17:16 +0300 |
commit | b10c83f35864b20650435bc4154a5c9dc356561e (patch) | |
tree | 0ab769250399360184d3a647d52e181324aaf907 /common | |
parent | 7f44eba2e977f9d2f988dad0008bc59c34ad6edb (diff) |
Use lld linker, if available.
Diffstat (limited to 'common')
-rw-r--r-- | common/unix-debug.mk | 9 | ||||
-rw-r--r-- | common/unix-release.mk | 4 |
2 files changed, 13 insertions, 0 deletions
diff --git a/common/unix-debug.mk b/common/unix-debug.mk new file mode 100644 index 00000000..e01aa905 --- /dev/null +++ b/common/unix-debug.mk @@ -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 diff --git a/common/unix-release.mk b/common/unix-release.mk index 07ac7d62..b5a46c02 100644 --- a/common/unix-release.mk +++ b/common/unix-release.mk @@ -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 |