From 582e6ad8213eeb48d99a52f0dff0617985eefcf6 Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Thu, 28 Mar 2024 01:30:56 -0700 Subject: [PATCH] Keep -march=native for Mac x86-64 [skip ci] --- Makefile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Makefile b/Makefile index 39c145c..ed17b54 100644 --- a/Makefile +++ b/Makefile @@ -12,6 +12,13 @@ REGRESS_OPTS = --inputdir=test --load-extension=$(EXTENSION) OPTFLAGS = +# Since runtime dispatch not supported +ifeq ($(shell uname -s), Darwin) + ifeq ($(shell uname -m), x86_64) + OPTFLAGS = -march=native + endif +endif + # For auto-vectorization: # - GCC (needs -ftree-vectorize OR -O3) - https://gcc.gnu.org/projects/tree-ssa/vectorization.html # - Clang (could use pragma instead) - https://llvm.org/docs/Vectorizers.html