File tree Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Expand file tree Collapse file tree 1 file changed +10
-11
lines changed Original file line number Diff line number Diff line change 18
18
19
19
cross_compiling = "_PYTHON_HOST_PLATFORM" in os .environ
20
20
21
- # Add special CFLAGS reserved for building the interpreter and the stdlib
22
- # modules (Issue #21121).
23
- cflags = sysconfig .get_config_var ('CFLAGS' )
24
- py_cflags_nodist = sysconfig .get_config_var ('PY_CFLAGS_NODIST' )
25
- sysconfig .get_config_vars ()['CFLAGS' ] = cflags + ' ' + py_cflags_nodist
26
-
27
- # Add special LDFLAGS reserved for building the interpreter and the stdlib
28
- # modules (bpo-35257).
29
- ldflags = sysconfig .get_config_var ('LDFLAGS' )
30
- py_ldflags_nodist = sysconfig .get_config_var ('PY_LDFLAGS_NODIST' )
31
- sysconfig .get_config_vars ()['LDFLAGS' ] = ldflags + ' ' + py_ldflags_nodist
21
+ # Set common compiler and linker flags derived from the Makefile,
22
+ # reserved for building the interpreter and the stdlib modules.
23
+ # See bpo-21121 and bpo-35257
24
+ def set_compiler_flags (compiler_flags , compiler_py_flags_nodist ):
25
+ flags = sysconfig .get_config_var (compiler_flags )
26
+ py_flags_nodist = sysconfig .get_config_var (compiler_py_flags_nodist )
27
+ sysconfig .get_config_vars ()[compiler_flags ] = flags + ' ' + py_flags_nodist
28
+
29
+ set_compiler_flags ('CFLAGS' , 'PY_CFLAGS_NODIST' )
30
+ set_compiler_flags ('LDFLAGS' , 'PY_LDFLAGS_NODIST' )
32
31
33
32
class Dummy :
34
33
"""Hack for parallel build"""
You can’t perform that action at this time.
0 commit comments