Skip to content

Commit e1822c2

Browse files
committed
Avoid extra linker flags on Windows ARM64 (advapi32, gfortran, quadmath)
1 parent a9daa2a commit e1822c2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

local/scipy_openblas64/__init__.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
from pathlib import Path
88
import sys
99
from textwrap import dedent
10-
10+
import platform
1111

1212
_HERE = Path(__file__).resolve().parent
1313

@@ -68,8 +68,11 @@ def get_pkg_config(use_preloading=False):
6868
``f"-L{get_library()}" so that at runtime this module must be imported before
6969
the target module
7070
"""
71+
machine = platform.machine().lower()
72+
extralib = ""
7173
if sys.platform == "win32":
72-
extralib = "-defaultlib:advapi32 -lgfortran -lquadmath"
74+
if machine != "arm64":
75+
extralib = "-defaultlib:advapi32 -lgfortran -lquadmath"
7376
libs_flags = f"-L${{libdir}} -l{get_library()}"
7477
else:
7578
extralib = f"-lm -lpthread -lgfortran -lquadmath -L${{libdir}} -l{get_library()}"

0 commit comments

Comments
 (0)