Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/wolfpld/tracy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorBartosz Taudul <wolf@nereid.pl>2022-04-27 03:17:16 +0300
committerBartosz Taudul <wolf@nereid.pl>2022-04-27 03:17:16 +0300
commitb10c83f35864b20650435bc4154a5c9dc356561e (patch)
tree0ab769250399360184d3a647d52e181324aaf907 /common
parent7f44eba2e977f9d2f988dad0008bc59c34ad6edb (diff)
Use lld linker, if available.
Diffstat (limited to 'common')
-rw-r--r--common/unix-debug.mk9
-rw-r--r--common/unix-release.mk4
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