Fix link args for cusolver
@@ -270,13 +270,16 @@ def make_extensions(options, compiler, use_cython):
s['libraries'] = module['libraries']
if module['name'] == 'cusolver':
- args = s.setdefault('extra_compile_args', [])
+ compiler_args = s.setdefault('extra_compile_args', [])
+ link_args = s.setdefault('extra_link_args', [])
# openmp is required for cusolver
if compiler.compiler_type == 'unix' and sys.platform != 'darwin':
# In mac environment, openmp is not required.
- args.append('-fopenmp')
+ compile_args.append('-fopenmp')
+ link_args.append('-fopenmp')
elif compiler.compiler_type == 'msvc':
- args.append('/openmp')
+ compiler_args.append('/openmp')
+ link_args.append('/openmp')
if not no_cuda and module['name'] == 'thrust':
if build.get_nvcc_path() is None:
