File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -23,13 +23,16 @@ CFLAGS += -std=c89 -pthread -O3 -Wall -g -Iinclude -Isrc
2323CI_CFLAGS := $(CFLAGS ) -Werror=declaration-after-statement -D_FORTIFY_SOURCE=2 \
2424 -Wextra -Wno-type-limits -Werror -coverage -DTEST_LARGE_RAM
2525
26- OPTTEST := $(shell $(CC ) -Iinclude -Isrc -march=native src/opt.c -c \
26+ OPTTARGET ?= native
27+ OPTTEST := $(shell $(CC ) -Iinclude -Isrc -march=$(OPTTARGET ) src/opt.c -c \
2728 -o /dev/null 2>/dev/null; echo $$? )
2829# Detect compatible platform
2930ifneq ($(OPTTEST ) , 0)
31+ $(info Building without optimizations)
3032 SRC += src/ref.c
3133else
32- CFLAGS += -march=native
34+ $(info Building with optimizations for $(OPTTARGET))
35+ CFLAGS += -march=$(OPTTARGET)
3336 SRC += src/opt.c
3437endif
3538
You can’t perform that action at this time.
0 commit comments