(static=False)
| 108 | |
| 109 | |
| 110 | def get_compiler(static=False): |
| 111 | # NOTES: |
| 112 | # - VS2008 and VS2010 are both using distutils/msvc9compiler.py |
| 113 | compiler = new_compiler() |
| 114 | # Must initialize so that "compile_options" and others are available |
| 115 | compiler.initialize() |
| 116 | if static: |
| 117 | compiler.compile_options.remove("/MD") |
| 118 | # Overwrite function that adds /MANIFESTFILE, as for subprocess |
| 119 | # manifest is disabled. Otherwise warning LNK4075 is generated. |
| 120 | if hasattr(compiler, "manifest_setup_ldargs"): |
| 121 | compiler.manifest_setup_ldargs = lambda *_: None |
| 122 | return compiler |
| 123 | |
| 124 | |
| 125 | def build_library(lib_name, macros, output_dir, |
no test coverage detected