From 0d4a4f6d9bb6a2f3b1f1cb1b0316187f0f0a2a12 Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Thu, 19 May 2022 23:34:47 -0700 Subject: [PATCH 1/2] Support TRACY_NO_LTO build flag. --- capture/build/unix/release.mk | 5 ++++- csvexport/build/unix/release.mk | 5 ++++- import-chrome/build/unix/release.mk | 5 ++++- profiler/build/unix/release.mk | 5 ++++- update/build/unix/release.mk | 5 ++++- 5 files changed, 20 insertions(+), 5 deletions(-) diff --git a/capture/build/unix/release.mk b/capture/build/unix/release.mk index e70f36d4..ccf07661 100644 --- a/capture/build/unix/release.mk +++ b/capture/build/unix/release.mk @@ -1,4 +1,7 @@ -CFLAGS := -O3 -flto +CFLAGS := -O3 +ifndef TRACY_NO_LTO +CFLAGS += -flto +endif DEFINES := -DNDEBUG BUILD := release diff --git a/csvexport/build/unix/release.mk b/csvexport/build/unix/release.mk index e70f36d4..ccf07661 100644 --- a/csvexport/build/unix/release.mk +++ b/csvexport/build/unix/release.mk @@ -1,4 +1,7 @@ -CFLAGS := -O3 -flto +CFLAGS := -O3 +ifndef TRACY_NO_LTO +CFLAGS += -flto +endif DEFINES := -DNDEBUG BUILD := release diff --git a/import-chrome/build/unix/release.mk b/import-chrome/build/unix/release.mk index e70f36d4..ccf07661 100644 --- a/import-chrome/build/unix/release.mk +++ b/import-chrome/build/unix/release.mk @@ -1,4 +1,7 @@ -CFLAGS := -O3 -flto +CFLAGS := -O3 +ifndef TRACY_NO_LTO +CFLAGS += -flto +endif DEFINES := -DNDEBUG BUILD := release diff --git a/profiler/build/unix/release.mk b/profiler/build/unix/release.mk index e70f36d4..ccf07661 100644 --- a/profiler/build/unix/release.mk +++ b/profiler/build/unix/release.mk @@ -1,4 +1,7 @@ -CFLAGS := -O3 -flto +CFLAGS := -O3 +ifndef TRACY_NO_LTO +CFLAGS += -flto +endif DEFINES := -DNDEBUG BUILD := release diff --git a/update/build/unix/release.mk b/update/build/unix/release.mk index e70f36d4..ccf07661 100644 --- a/update/build/unix/release.mk +++ b/update/build/unix/release.mk @@ -1,4 +1,7 @@ -CFLAGS := -O3 -flto +CFLAGS := -O3 +ifndef TRACY_NO_LTO +CFLAGS += -flto +endif DEFINES := -DNDEBUG BUILD := release From e8627997970aa415f76b21b27252180aa0aa7133 Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Thu, 25 Nov 2021 20:33:46 -0800 Subject: [PATCH 2/2] Support TRACY_NO_ISA_EXTENSIONS build flag. --- common/unix-debug.mk | 2 ++ common/unix-release.mk | 2 ++ library/unix/debug.mk | 2 ++ library/unix/release.mk | 2 ++ 4 files changed, 8 insertions(+) diff --git a/common/unix-debug.mk b/common/unix-debug.mk index f304dac4..3e57f6e0 100644 --- a/common/unix-debug.mk +++ b/common/unix-debug.mk @@ -6,6 +6,8 @@ LDFLAGS := -fuse-ld=mold endif endif +ifndef TRACY_NO_ISA_EXTENSIONS ifeq ($(ARCH),x86_64) CFLAGS += -msse4.1 endif +endif diff --git a/common/unix-release.mk b/common/unix-release.mk index a91ddb09..4b5eec80 100644 --- a/common/unix-release.mk +++ b/common/unix-release.mk @@ -10,8 +10,10 @@ LDFLAGS := -s endif endif +ifndef TRACY_NO_ISA_EXTENSIONS ifneq (,$(filter $(ARCH),aarch64 arm64)) CFLAGS += -mcpu=native else CFLAGS += -march=native endif +endif diff --git a/library/unix/debug.mk b/library/unix/debug.mk index 04d925a6..cec9c76d 100644 --- a/library/unix/debug.mk +++ b/library/unix/debug.mk @@ -4,8 +4,10 @@ CFLAGS := -g3 -Wall DEFINES := -DDEBUG BUILD := debug +ifndef TRACY_NO_ISA_EXTENSIONS ifeq ($(ARCH),x86_64) CFLAGS += -msse4.1 endif +endif include build.mk diff --git a/library/unix/release.mk b/library/unix/release.mk index 24b52543..10b56542 100644 --- a/library/unix/release.mk +++ b/library/unix/release.mk @@ -4,8 +4,10 @@ CFLAGS := -O3 -s DEFINES := -DNDEBUG BUILD := release +ifndef TRACY_NO_ISA_EXTENSIONS ifeq ($(ARCH),x86_64) CFLAGS += -msse4.1 endif +endif include build.mk