Hi,

For distutils.command.build_clib the commonly used code below does not
work for adding additional compiler flags (it works using
distutils.command.build_ext):

extra_compile_args = '-fopenmp'

On Unix-like system I found a workaround which allows to specify
additional compiler flags for distutils.command.build_clib:

cflags = distutils.sysconfig.get_config_var('CFLAGS')
distutils.sysconfig._config_vars['CFLAGS'] = cflags + " -fopenmp"

Unfortunately this does not work with Microsoft's C/C++ compiler
cl.exe.

Does anybody know how I can add additional compiler flags for cl.exe
and distutils.command.build_clib?

Thanks and best regards!
_______________________________________________
Distutils-SIG maillist  -  Distutils-SIG@python.org
https://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to