numpy.distutils.ccompiler.CCompiler_customize#
- distutils.ccompiler.CCompiler_customize(self, dist, need_cxx=0)[源]#
对编译器实例进行任何平台特定的自定义。
此方法调用
distutils.sysconfig.customize_compiler
进行平台特定的自定义,并可选择性地删除一个标志以抑制编译 C++ 代码时出现的虚假警告。- 参数:
- dist对象
此参数未被使用。
- need_cxx布尔值, 可选
是否需要编译 C++。如果需要 (True),则移除
"-Wstrict-prototypes"
选项以防止虚假警告。默认为 False。
- 返回:
- 无
注意
distutils 使用的所有默认选项都可以通过以下方式提取:
from distutils import sysconfig sysconfig.get_config_vars('CC', 'CXX', 'OPT', 'BASECFLAGS', 'CCSHARED', 'LDSHARED', 'SO')