Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Respect environment CFLAGS #252

Merged
merged 1 commit into from Nov 25, 2022
Merged

Respect environment CFLAGS #252

merged 1 commit into from Nov 25, 2022

Conversation

cjmayo
Copy link
Collaborator

@cjmayo cjmayo commented Nov 24, 2022

[1] indirectly removed -Wstrict-prototypes by overwriting the environment CFLAGS with sysconfig.get_config_var("CFLAGS"), which is passed to the compiler anyway [2].

sysconfig.get_config_var("OPT") is included in
sysconfig.get_config_var("CFLAGS") [3].

Don't pass -O3 if CFLAGS is set because only the last -O option is used [4]. -DNDEBUG is typically present in sysconfig.get_config_var("CFLAGS").

[1]
426676c ("silenced annoying -Wstrict-prototypes warning", 2015-06-07)

[2]
https://setuptools.pypa.io/en/latest/userguide/ext_modules.html#compiler-and-linker-options

[3]
https://github.com/python/cpython/blob/351842b46a7cb3c3f23b200d532cf29e4557ad4b/Makefile.pre.in#L101

[4]
https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html

[1] indirectly removed -Wstrict-prototypes by overwriting the
environment CFLAGS with sysconfig.get_config_var("CFLAGS"), which is
passed to the compiler anyway [2].

sysconfig.get_config_var("OPT") is included in
sysconfig.get_config_var("CFLAGS") [3].

Don't pass -O3 if CFLAGS is set because only the last -O option is used
[4]. -DNDEBUG is typically present in sysconfig.get_config_var("CFLAGS").

[1]
426676c ("silenced annoying -Wstrict-prototypes warning", 2015-06-07)

[2]
https://setuptools.pypa.io/en/latest/userguide/ext_modules.html#compiler-and-linker-options

[3]
https://github.com/python/cpython/blob/351842b46a7cb3c3f23b200d532cf29e4557ad4b/Makefile.pre.in#L101

[4]
https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html
@codecov
Copy link

codecov bot commented Nov 24, 2022

Codecov Report

Merging #252 (a793a16) into master (3858a6f) will decrease coverage by 0.05%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #252      +/-   ##
==========================================
- Coverage   85.93%   85.87%   -0.06%     
==========================================
  Files          55       55              
  Lines       10392    10392              
==========================================
- Hits         8930     8924       -6     
- Misses       1462     1468       +6     
Impacted Files Coverage Δ
fract4dgui/application_window.py 86.87% <0.00%> (-2.27%) ⬇️
fract4d/fractconfig.py 92.15% <0.00%> (-0.99%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Copy link
Member

@dragonmux dragonmux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks reasonable, and appears to solve the issues intended. Merging

@dragonmux dragonmux merged commit f90eb2a into fract4d:master Nov 25, 2022
@cjmayo cjmayo deleted the cflags branch December 20, 2022 19:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants