message: Add STAN_NO_COMPILER_OPTIM to turn off additional flags if user does not want them
diff: @@ -58,6 +58,7 @@ CXX_TYPE ?= other
  CXX_MAJOR := $(shell $(CXX) -dumpversion 2>&1 | cut -d'.' -f1)
  CXX_MINOR := $(shell $(CXX) -dumpversion 2>&1 | cut -d'.' -f2)
  +ifndef STAN_NO_COMPILER_OPTIMS
  ifeq (clang,$(CXX_TYPE))
  CXXFLAGS_OPTIM ?= -fvectorize -ftree-vectorize -fslp-vectorize -ftree-slp-vectorize -fno-standalone-debug -fstrict-return -ftrigraphs -fvisibility=hidden -fvisibility-inlines-hidden
  ifeq ($(shell expr $(CXX_MAJOR) \>= 5), 1)
  @@ -85,7 +86,7 @@ else ifeq (gcc,$(CXX_TYPE))
  LDFLAGS_FLTO ?= $(CXXFLAGS_FLTO)
  LDFLAGS_MPI_FLTO ?= $(CXXFLAGS_FLTO)
  endif
  -
  +endif
  ifdef STAN_THREADS
  STAN_FLAG_THREADS=_threads
  