We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 34a78dd commit aa71c98Copy full SHA for aa71c98
dpctl/opencl_core.py
@@ -59,16 +59,21 @@
59
60
ffi_lib_name = "dpctl._opencl_core"
61
62
+import sys
63
+IS_WIN = sys.platform in ['win32', 'cygwin']
64
+del sys
65
+
66
ffi.set_source(
67
ffi_lib_name,
68
"""
69
#include "dppl_opencl_interface.h" // the C header of the library
70
""",
71
include_dirs=[dppl_opencl_interface_incldir],
72
library_dirs=[dppl_opencl_interface_libdir, opencl_libdir],
73
+ extra_link_args=[] if IS_WIN else ['-Wl,-rpath=$ORIGIN'],
74
libraries=["DPPLOpenCLInterface", "OpenCL"],
75
) # library name, for the linker
-
76
+del IS_WIN
77
78
if __name__ == "__main__":
79
ffi.compile(verbose=True)
0 commit comments