|
31 | 31 | elif platform.system() == 'Darwin': |
32 | 32 | extra_compile_args = FLAGS_CLANG + MACOS_FLAG |
33 | 33 | extra_link_args = LFLAGS_CLANG + MACOS_FLAG |
34 | | -elif platform.system() == 'FreeBSD': |
| 34 | +elif platform.system() in {'FreeBSD', 'OpenBSD'}: |
35 | 35 | extra_compile_args = FLAGS_CLANG |
36 | 36 | extra_link_args = LFLAGS_CLANG |
37 | 37 | else: |
38 | 38 | extra_compile_args = FLAGS_POSIX |
39 | 39 | extra_link_args = LFLAGS_POSIX |
40 | 40 |
|
41 | | -if platform.system() in {'Darwin', 'FreeBSD'}: |
| 41 | +if platform.system() in {'Darwin', 'FreeBSD', 'OpenBSD'}: |
42 | 42 | os.environ.setdefault('CC', 'clang') |
43 | 43 | os.environ.setdefault('CXX', 'clang++') |
44 | 44 | orig_customize_compiler = distutils.sysconfig.customize_compiler |
@@ -117,7 +117,7 @@ def customize_compiler(compiler): |
117 | 117 | if get_build_version() < 14.0: |
118 | 118 | msvc9compiler.get_build_version = lambda: 14.0 |
119 | 119 | msvc9compiler.VERSION = 14.0 |
120 | | - elif platform.system() in ('Darwin', 'FreeBSD'): |
| 120 | + elif platform.system() in {'Darwin', 'FreeBSD', 'OpenBSD'}: |
121 | 121 | # Dirty workaround to avoid link error... |
122 | 122 | # Python distutils doesn't provide any way |
123 | 123 | # to configure different flags for each cc and c++. |
|
0 commit comments