Skip to content

Conversation

lazka
Copy link
Contributor

@lazka lazka commented Sep 9, 2025

Multiple issues making the build fail:

Just use the builtin compiler intrinsics everywhere for GCC/Clang when targeting Windows. Same as is already done in misc_thread_posix.h

See #159

Multiple issues making the build fail:

* _InterlockedExchange8 is missing in mingw-w64, filed in
  mingw-w64/mingw-w64#118
* cffi_atomic_store_ssize is missing casts, leading to errors
* __ldar8/__ldar64 are not supported in gcc/clang

Just use the builtin compiler intrinsics everywhere for GCC/Clang
when targeting Windows. Same as is already done in misc_thread_posix.h

See python-cffi#159
@mattip
Copy link
Contributor

mattip commented Sep 10, 2025

Pending #137 to make the windows CI runs faster, maybe we should add a mingw CI run for a single python version. On the other hand, what is the priority for this compiler? I would expect many mingw users can pip install cffi, use the binary wheel we provide, and not have to compile from source.

@lazka
Copy link
Contributor Author

lazka commented Sep 10, 2025

There is no priority for me at least, I patched it downstream in MSYS2 already. I just had the patch anyway, and saw the issue, so proposed it.

There are no compatible binary wheels, so pip always builds from source (and as a result it's not easy/error prone)

@mattip mattip merged commit bd69b85 into python-cffi:main Sep 11, 2025
32 checks passed
@mattip
Copy link
Contributor

mattip commented Sep 11, 2025

Thanks @lazka

@lazka
Copy link
Contributor Author

lazka commented Sep 12, 2025

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants