2021-01-26 18:46:39 +00:00
|
|
|
ARCH := $(shell uname -m)
|
|
|
|
|
2022-04-28 20:51:37 +00:00
|
|
|
ifeq (0,$(shell $(CC) --version | grep clang > /dev/null && echo 1 || echo 0))
|
2021-01-26 18:39:24 +00:00
|
|
|
CFLAGS += -s
|
2021-01-26 21:52:08 +00:00
|
|
|
else
|
2022-05-05 00:40:00 +00:00
|
|
|
ifeq (1,$(shell ld.mold --version > /dev/null 2> /dev/null && echo 1 || echo 0))
|
2022-04-27 16:20:36 +00:00
|
|
|
LDFLAGS := -s -fuse-ld=mold
|
2022-04-27 00:33:22 +00:00
|
|
|
else
|
2021-01-26 21:52:08 +00:00
|
|
|
LDFLAGS := -s
|
2022-04-27 00:33:22 +00:00
|
|
|
endif
|
2022-04-27 00:17:16 +00:00
|
|
|
endif
|
|
|
|
|
2021-11-26 04:33:46 +00:00
|
|
|
ifndef TRACY_NO_ISA_EXTENSIONS
|
2021-01-26 21:54:54 +00:00
|
|
|
ifneq (,$(filter $(ARCH),aarch64 arm64))
|
2021-01-26 18:46:39 +00:00
|
|
|
CFLAGS += -mcpu=native
|
|
|
|
else
|
|
|
|
CFLAGS += -march=native
|
|
|
|
endif
|
2021-11-26 04:33:46 +00:00
|
|
|
endif
|