Skip to content

Commit 91a9a9e

Browse files
committed
bug fix
1 parent 8920559 commit 91a9a9e

1 file changed

Lines changed: 18 additions & 9 deletions

File tree

setup.py

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -42,15 +42,24 @@ def detect_gcc_on_windows():
4242

4343
# Use same GCC flags as Linux for consistency with SciPy
4444
# Note: Disabled LTO due to old GCC version issues
45-
extra_compile_args = [
46-
"-O3",
47-
"-march=native",
48-
"-ffast-math",
49-
"-funroll-loops",
50-
"-msse2",
51-
"-msse3",
52-
"-msse4",
53-
]
45+
if os.getenv("GITHUB_ACTIONS") == "true":
46+
# Safe flags for GitHub Actions (no -march=native for universal builds)
47+
extra_compile_args = [
48+
"-O3",
49+
"-ffast-math",
50+
"-funroll-loops",
51+
]
52+
else:
53+
# Local development with native optimization
54+
extra_compile_args = [
55+
"-O3",
56+
"-march=native",
57+
"-ffast-math",
58+
"-funroll-loops",
59+
"-msse2",
60+
"-msse3",
61+
"-msse4",
62+
]
5463
extra_link_args = []
5564
compiler_type = "GCC"
5665
else:

0 commit comments

Comments
 (0)