diff --git a/capture/build/unix/release.mk b/capture/build/unix/release.mk index b59abd5c..dcd41b0d 100644 --- a/capture/build/unix/release.mk +++ b/capture/build/unix/release.mk @@ -1,7 +1,6 @@ -ARCH := $(shell uname -m) - -CFLAGS := -O3 -s -march=native +CFLAGS := -O3 -march=native DEFINES := -DNDEBUG BUILD := release +include ../../../common/unix-release.mk include build.mk diff --git a/common/unix-release.mk b/common/unix-release.mk new file mode 100644 index 00000000..b95e7e41 --- /dev/null +++ b/common/unix-release.mk @@ -0,0 +1,3 @@ +ifeq (0,$(shell $(CC) --version | grep clang && echo 1 || echo 0)) +CFLAGS += -s +endif diff --git a/import-chrome/build/unix/release.mk b/import-chrome/build/unix/release.mk index b59abd5c..dcd41b0d 100644 --- a/import-chrome/build/unix/release.mk +++ b/import-chrome/build/unix/release.mk @@ -1,7 +1,6 @@ -ARCH := $(shell uname -m) - -CFLAGS := -O3 -s -march=native +CFLAGS := -O3 -march=native DEFINES := -DNDEBUG BUILD := release +include ../../../common/unix-release.mk include build.mk diff --git a/profiler/build/unix/release.mk b/profiler/build/unix/release.mk index b59abd5c..dcd41b0d 100644 --- a/profiler/build/unix/release.mk +++ b/profiler/build/unix/release.mk @@ -1,7 +1,6 @@ -ARCH := $(shell uname -m) - -CFLAGS := -O3 -s -march=native +CFLAGS := -O3 -march=native DEFINES := -DNDEBUG BUILD := release +include ../../../common/unix-release.mk include build.mk diff --git a/update/build/unix/release.mk b/update/build/unix/release.mk index b59abd5c..dcd41b0d 100644 --- a/update/build/unix/release.mk +++ b/update/build/unix/release.mk @@ -1,7 +1,6 @@ -ARCH := $(shell uname -m) - -CFLAGS := -O3 -s -march=native +CFLAGS := -O3 -march=native DEFINES := -DNDEBUG BUILD := release +include ../../../common/unix-release.mk include build.mk