diff --git a/distutils/sysconfig.py b/distutils/sysconfig.py index 358d1079..ef3def83 100644 --- a/distutils/sysconfig.py +++ b/distutils/sysconfig.py @@ -341,7 +341,6 @@ def customize_compiler(compiler): ldshared = _add_flags(ldshared, 'LD') ldcxxshared = _add_flags(ldcxxshared, 'LD') cflags = os.environ.get('CFLAGS', cflags) - cflags = _add_flags(cflags, 'C') ldshared = _add_flags(ldshared, 'C') cxxflags = os.environ.get('CXXFLAGS', cxxflags) ldcxxshared = _add_flags(ldcxxshared, 'CXX') diff --git a/distutils/tests/test_sysconfig.py b/distutils/tests/test_sysconfig.py index 867e7dcb..43d77c23 100644 --- a/distutils/tests/test_sysconfig.py +++ b/distutils/tests/test_sysconfig.py @@ -130,11 +130,9 @@ def test_customize_compiler(self): comp = self.customize_compiler() assert comp.exes['archiver'] == 'env_ar --env-arflags' assert comp.exes['preprocessor'] == 'env_cpp --env-cppflags' - assert ( - comp.exes['compiler'] == 'env_cc --env-cflags --env-cflags --env-cppflags' - ) + assert comp.exes['compiler'] == 'env_cc --env-cflags --env-cppflags' assert comp.exes['compiler_so'] == ( - 'env_cc --env-cflags --env-cflags --env-cppflags --sc-ccshared' + 'env_cc --env-cflags --env-cppflags --sc-ccshared' ) assert ( comp.exes['compiler_cxx']