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
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
parent7f44eba2e977f9d2f988dad0008bc59c34ad6edb (diff)
Use lld linker, if available.
-rw-r--r--capture/build/unix/debug.mk7
-rw-r--r--common/unix-debug.mk9
-rw-r--r--common/unix-release.mk4
-rw-r--r--csvexport/build/unix/debug.mk7
-rw-r--r--import-chrome/build/unix/debug.mk7
-rw-r--r--profiler/build/unix/debug.mk7
-rw-r--r--update/build/unix/debug.mk7
7 files changed, 18 insertions, 30 deletions
diff --git a/capture/build/unix/debug.mk b/capture/build/unix/debug.mk
index 04d925a6..a4ec6b6a 100644
--- a/capture/build/unix/debug.mk
+++ b/capture/build/unix/debug.mk
@@ -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
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
diff --git a/csvexport/build/unix/debug.mk b/csvexport/build/unix/debug.mk
index 04d925a6..a4ec6b6a 100644
--- a/csvexport/build/unix/debug.mk
+++ b/csvexport/build/unix/debug.mk
@@ -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
diff --git a/import-chrome/build/unix/debug.mk b/import-chrome/build/unix/debug.mk
index 04d925a6..a4ec6b6a 100644
--- a/import-chrome/build/unix/debug.mk
+++ b/import-chrome/build/unix/debug.mk
@@ -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
diff --git a/profiler/build/unix/debug.mk b/profiler/build/unix/debug.mk
index 04d925a6..a4ec6b6a 100644
--- a/profiler/build/unix/debug.mk
+++ b/profiler/build/unix/debug.mk
@@ -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
diff --git a/update/build/unix/debug.mk b/update/build/unix/debug.mk
index 04d925a6..a4ec6b6a 100644
--- a/update/build/unix/debug.mk
+++ b/update/build/unix/debug.mk
@@ -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