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/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/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/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 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