Skip to content

Commit a4ab298

Browse files
committed
Work around invalid register errors with 64-bit Windows (#28449)
Adding `-fno-asynchronous-unwind-tables` to the C compiler flags passed to OpenBLAS works around errors claiming an invalid register for `.seh_savexmm`. We've been running into this on the 64-bit Windows buildbots. See discussion in OpenMathLib/OpenBLAS#1708. (cherry picked from commit 651a727)
1 parent 7db5750 commit a4ab298

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

deps/blas.mk

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,15 @@ OPENBLAS_FFLAGS += -mincoming-stack-boundary=2
6262
endif
6363
endif
6464

65+
# Work around invalid register errors on 64-bit Windows
66+
# See discussion in https://github.com/xianyi/OpenBLAS/issues/1708
67+
# TODO: Remove this once we use a version of OpenBLAS where this is set automatically
68+
ifeq ($(OS),WINNT)
69+
ifeq ($(ARCH),x86_64)
70+
OPENBLAS_CFLAGS += -fno-asynchronous-unwind-tables
71+
endif
72+
endif
73+
6574
OPENBLAS_BUILD_OPTS += CFLAGS="$(CFLAGS) $(OPENBLAS_CFLAGS)"
6675
OPENBLAS_BUILD_OPTS += FFLAGS="$(FFLAGS) $(OPENBLAS_FFLAGS)"
6776
OPENBLAS_BUILD_OPTS += LDFLAGS="$(LDFLAGS) $(RPATH_ESCAPED_ORIGIN)"

0 commit comments

Comments
 (0)