Use CFLAGS if set as-is, match CXXFLAGS behavior#322
Conversation
|
That's weird - I'm using the "new merge experience", and it wasn't running the checks for the PR, even after force-pushing the changes after rebasing to main (I didn't want the other commit in there) and pushing a nitpicky linter fix. I had to go to the actions and manually approve the PR there. I guess the new merge experience still needs some work. Edit: I see now it's a known issue. |
|
Thanks @jaraco! (I haven't yet used the new merge experience, sounds like it's a good thing I've left it...) |
| cflags = os.environ.get('CFLAGS', cflags) | ||
| cflags = _add_flags(cflags, 'C') |
There was a problem hiding this comment.
Hi, I am a bit confused why you are keeping the _add_flags(cflags, 'C') line, CXX doesn't have it (should it?), and it seems redundant (probably duplicates those flags, although I didn't test)?
There was a problem hiding this comment.
No, you're right, I'd left it in because I tried something else, and forgot to clean it up. I'll do that in a followup after testing it.
There was a problem hiding this comment.
Thanks, submitted #325. Sorry for the oversight.
Followup to af7fcbb. I accidentally left that in when trying two approaches. Reported at pypa#322 (comment).
Since 2c93711, CXXFLAGS is used as-is if set in the envionment rather than clobbered by whatever CPython happened to be built with.
Do the same for CFLAGS: use it as-is if set in the environment, don't prepend CPython's saved flags.
Fixes: #299