Skip to content

Commit 3c8aaf8

Browse files
committed
python/src/moocore/_ffi_build.py: Add -march= to link flags.
1 parent 8722983 commit 3c8aaf8

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

python/src/moocore/_ffi_build.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,17 @@ def _get_target_platform():
8989
extra_compile_args.extend(MSVC_CFLAGS)
9090
extra_link_args.extend(MSVC_LDFLAGS)
9191
if is_x86_64:
92-
extra_compile_args.append("/arch:AVX")
92+
extra_args = ["/arch:AVX"]
93+
extra_compile_args.extend(extra_args)
94+
extra_link_args.extend(extra_args)
9395
else:
9496
extra_compile_args.extend(GCC_CFLAGS)
9597
extra_link_args.extend(GCC_CFLAGS)
9698
# Compile for sufficiently old x86-64 architecture.
9799
if is_x86_64:
98-
extra_compile_args.append("-march=x86-64-v2")
100+
extra_args = ["-march=x86-64-v2"]
101+
extra_compile_args.extend(extra_args)
102+
extra_link_args.extend(extra_args)
99103

100104
cflags = os.environ.get("CFLAGS", "")
101105
if cflags != "":

0 commit comments

Comments
 (0)