Skip to content

Commit 23154fa

Browse files
committed
don't build or test a static library on windows
1 parent a891bc8 commit 23154fa

3 files changed

Lines changed: 3 additions & 24 deletions

File tree

‎.github/workflows/windows.yml‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,6 @@ jobs:
7676
- name: Test
7777
run: |
7878
& $env:BASH_PATH -lc tools/build_gfortran.sh
79-
echo "Static test"
80-
.\for_test\test.exe
8179
echo "Dynamic test"
8280
.\for_test\test_dyn.exe
8381

‎tools/build_gfortran.sh‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,18 @@ cd for_test
99
repo_path=$(cygpath "$START_DIR")
1010
OBP=$(cygpath $OPENBLAS_ROOT\\$BUILD_BITS)
1111

12-
static_libname=$(find $OBP/lib -maxdepth 1 -type f -name '*.a' \! -name '*.dll.a' | tail -1)
1312
dynamic_libname=$(find $OBP/lib -maxdepth 1 -type f -name '*.dll.a' | tail -1)
1413
dll_name=$(find $OBP/bin -maxdepth 1 -type f -name '*.dll' | tail -1)
1514

1615
grep dpotrf $OBP/include/*
17-
nm $static_libname | grep dpotrf
16+
nm $dynamic_libname | grep dpotrf
1817

1918
cp $dll_name .
2019

20+
# Only the DLL ships in the wheel (see build_prepare_wheel.sh / windows.yml),
21+
# so we only test linking against it, not against a static library.
2122
if [ "$INTERFACE64" == "1" ]; then
22-
gfortran -I $OBP/include -fdefault-integer-8 -o test.exe ${repo_path}/test64_.f90 $static_libname
2323
gfortran -I $OBP/include -fdefault-integer-8 -o test_dyn.exe ${repo_path}/test64_.f90 $dynamic_libname
2424
else
25-
gfortran -I $OBP/include -o test.exe ${repo_path}/test.f90 $static_libname
2625
gfortran -I $OBP/include -o test_dyn.exe ${repo_path}/test.f90 $dynamic_libname
2726
fi

‎tools/build_steps_windows.sh‎

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -142,24 +142,6 @@ make PREFIX=$openblas_root/$build_bits $interface_flags install
142142
DLL_BASENAME=libscipy_openblas${LIBNAMESUFFIX}
143143
cp -f *.dll.a $openblas_root/$build_bits/lib/${DLL_BASENAME}.dll.a
144144

145-
# OpenBLAS does not build a symbol-suffixed static library on Windows:
146-
# do it ourselves. On 32-bit builds, the objcopy.def names need a '_' prefix
147-
static_libname=$(find . -maxdepth 1 -type f -name '*.a' \! -name '*.dll.a' | tail -1)
148-
make -C exports $interface_flags objcopy.def
149-
150-
if [ "$build_bits" == "32" ]; then
151-
sed -i "s/^/_/" exports/objcopy.def
152-
sed -i "s/scipy_/_scipy_/" exports/objcopy.def
153-
else
154-
echo not updating objcopy,def, buildbits=$build_bits
155-
fi
156-
echo "\nshow some of objcopy.def"
157-
head -10 exports/objcopy.def
158-
echo
159-
objcopy --redefine-syms exports/objcopy.def "${static_libname}" "${static_libname}.renamed"
160-
cp -f "${static_libname}.renamed" "$openblas_root/$build_bits/lib/${static_libname}"
161-
cp -f "${static_libname}.renamed" "$openblas_root/$build_bits/lib/${DLL_BASENAME}.a"
162-
163145
cd $openblas_root
164146
# Copy library link file for custom name
165147
pushd $build_bits/lib

0 commit comments

Comments
 (0)