diff --git a/deps/blas.mk b/deps/blas.mk index 26e985be75869..c025d4ac26e39 100644 --- a/deps/blas.mk +++ b/deps/blas.mk @@ -62,6 +62,15 @@ OPENBLAS_FFLAGS += -mincoming-stack-boundary=2 endif endif +# Work around invalid register errors on 64-bit Windows +# See discussion in https://github.com/xianyi/OpenBLAS/issues/1708 +# TODO: Remove this once we use a version of OpenBLAS where this is set automatically +ifeq ($(OS),WINNT) +ifeq ($(ARCH),x86_64) +OPENBLAS_CFLAGS += -fno-asynchronous-unwind-tables +endif +endif + OPENBLAS_BUILD_OPTS += CFLAGS="$(CFLAGS) $(OPENBLAS_CFLAGS)" OPENBLAS_BUILD_OPTS += FFLAGS="$(FFLAGS) $(OPENBLAS_FFLAGS)" OPENBLAS_BUILD_OPTS += LDFLAGS="$(LDFLAGS) $(RPATH_ESCAPED_ORIGIN)"