diff --git a/cuda_bindings/build_hooks.py b/cuda_bindings/build_hooks.py index 99ad5c66268..63a371d125d 100644 --- a/cuda_bindings/build_hooks.py +++ b/cuda_bindings/build_hooks.py @@ -137,6 +137,7 @@ def _build_cuda_bindings(debug=False): that metadata queries do not require a CUDA toolkit installation. """ from Cython.Build import cythonize + from Cython.Compiler import Options as _CythonOptions global _extensions @@ -230,6 +231,7 @@ def get_static_libraries(f): ) # Cythonize + _CythonOptions.warning_errors = True cython_directives = {"language_level": 3, "embedsignature": True, "binding": True, "freethreading_compatible": True} if compile_for_coverage: cython_directives["linetrace"] = True diff --git a/cuda_bindings/cuda/bindings/_lib/windll.pxd b/cuda_bindings/cuda/bindings/_lib/windll.pxd index 294a1a9fd90..b5fd5c4db90 100644 --- a/cuda_bindings/cuda/bindings/_lib/windll.pxd +++ b/cuda_bindings/cuda/bindings/_lib/windll.pxd @@ -14,7 +14,7 @@ cdef extern from "windows.h" nogil: ctypedef const char *LPCSTR ctypedef int BOOL - cdef DWORD LOAD_LIBRARY_SEARCH_SYSTEM32 = 0x00000800 + const DWORD LOAD_LIBRARY_SEARCH_SYSTEM32 HMODULE _LoadLibraryExW "LoadLibraryExW"( LPCWSTR lpLibFileName,