The failure was seen in Homebrew/homebrew-core#219339. It was caused by too many arguments (*.o files) being passed to ar.
Specifically, the cmake options used are
-DBUILD_SHARED_LIBS=ON
-DBUILD_STATIC_LIBS=ON
-DNUM_THREADS=64
-DTARGET=NEHALEM
-DDYNAMIC_ARCH=ON
The problematic ar call looks like
/usr/bin/ar qc lib/libopenblas.a interface/CMakeFiles/interface.dir/CMakeFiles/scopy.c.o interface/CMakeFiles/interface.dir/CMakeFiles/snrm2.c.o .......
which has over 1000000 characters, due to large amount of object files. And the error message is:
collect2: fatal error: posix_spawnp: Argument list too long