Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 849965d

Browse files
committed
copy dll.a differently
1 parent 261b95e commit 849965d

File tree

1 file changed

+17
-18
lines changed

1 file changed

+17
-18
lines changed

tools/build_openblas.sh

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ git submodule update --init --recursive
4949

5050

5151
# Get / clean code
52-
# git fetch origin
53-
# if [ -n "$OPENBLAS_COMMIT" ]; then
54-
# git checkout $OPENBLAS_COMMIT
55-
# fi
56-
# git clean -fxd
57-
# git reset --hard
52+
git fetch origin
53+
if [ -n "$OPENBLAS_COMMIT" ]; then
54+
git checkout $OPENBLAS_COMMIT
55+
fi
56+
git clean -fxd
57+
git reset --hard
5858
rm -rf $openblas_root/$build_bits
5959

6060
# Set architecture flags
@@ -90,13 +90,14 @@ interface_flags="$interface_flags SYMBOLPREFIX=scipy_ LIBNAMEPREFIX=scipy_ FIXED
9090
# Build name for output library from gcc version and OpenBLAS commit.
9191
GCC_TAG="gcc_$(gcc -dumpversion | tr .- _)"
9292
OPENBLAS_VERSION=$(git describe --tags --abbrev=8)
93-
# Patch OpenBLAS to exclude stray GFortran symbol.
94-
# Replacement snprintf symbol only present for UCRTC 64-bit build.
95-
# if [ "$BUILD_BITS" == 64 ]; then
96-
# patch -p1 < ../patches-windows/openblas-make-libs.patch
97-
# fi
93+
94+
# Patch OpenBLAS build to resolve all symbols and avoid linking
95+
# with libquadmath
96+
if [ "$BUILD_BITS" == 64 ]; then
97+
patch -p1 < ../patches-windows/openblas-make-libs.patch
98+
fi
99+
98100
# Build OpenBLAS
99-
# Variable used in creating output libraries
100101
make BINARY=$build_bits DYNAMIC_ARCH=1 USE_THREAD=1 USE_OPENMP=0 \
101102
NUM_THREADS=24 NO_WARMUP=1 NO_AFFINITY=1 CONSISTENT_FPCSR=1 \
102103
BUILD_LAPACK_DEPRECATED=1 TARGET=PRESCOTT BUFFERSIZE=20\
@@ -107,12 +108,10 @@ make BINARY=$build_bits DYNAMIC_ARCH=1 USE_THREAD=1 USE_OPENMP=0 \
107108
$interface_flags
108109
make PREFIX=$openblas_root/$build_bits $interface_flags install
109110
DLL_BASENAME=libscipy_openblas${LIBNAMESUFFIX}
110-
if [ -f "${DLL_BASENAME}.dll.a" ]; then
111-
cp -f "${DLL_BASENAME}.dll.a" "$openblas_root/$build_bits/lib/"
112-
else
113-
# 32-bit build somehow does not put scipy_ into the import lib name
114-
cp -f "libopenblas.dll.a" "$openblas_root/$build_bits/lib/"
115-
fi
111+
echo ------
112+
ls *.dll.a
113+
echo ------
114+
cp -f *.dll.a $openblas_root/$build_bits/lib/{DLL_BASENAME}.dll.a
116115

117116
# OpenBLAS does not build a symbol-suffixed static library on Windows:
118117
# do it ourselves. On 32-bit builds, the objcopy.def names need a '_' prefix

0 commit comments

Comments
 (0)