Skip to content

Commit

Permalink
Merge pull request #325 from thesamesam/cflags
Browse files Browse the repository at this point in the history
Don't duplicate CFLAGS
  • Loading branch information
jaraco authored Jan 5, 2025
2 parents ebfebc0 + bba5264 commit ff11eed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
1 change: 0 additions & 1 deletion distutils/sysconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
6 changes: 2 additions & 4 deletions distutils/tests/test_sysconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down

0 comments on commit ff11eed

Please sign in to comment.