-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Clean and sync debugging C flags #12659
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
Conversation
Btw this is maybe a bit unrelated, but it would be nice if the |
weird, seems there is no need ... otherwise those configure flags kind of defeat their own purpose don t you think ? |
If you're referencing |
I've now changed this a bit better. I've only removed dead code from configure.ac and synced the phpize.m4 file, so it will be possible to debug also extensions on systems where @danog, I'm not entirely sure what you mean here. I think that these current sanitizer options should work ok. Is there something that needs to be adjusted manually using CFLAGS on some system? Because the idea with all these debuging and more "development" oriented flags is that they are like a configuration that is shared but they are also adjusted manually in some cases. It is quite common case in these build systems and nothing special or anti-pattern alike is done here. P.S.: Sorry for such late reply :D |
Nevermind, this is already the case. |
Indeed, I was under the false impression that setting CFLAGS manually was needed to enable asan regardless of the configure flags, since the CI tasks did that too. Might be a good idea to remove those redundant flags from the CI then :) |
@danog As mentioned above, CI sets the flags manually because for some reason we get linker errors if we don't also set |
This removes the unused DEBUG_CFLAGS variable from configure.ac. It has been once set in the build files similarly to Zend.m4 but was then removed and simplified. CS synced and DEBUG_CFLAGS checked and appended with AS_VAR_* macros.
With the latest commit in the PR here only DEBUG_CFLAGS are synced. Merge coming up. |
These are already better set in the main configure.ac file. Also check is done if optimization flags need to be adjusted.The unused DEBUG_CFLAGS variable has been removed from Zend.m4 macros and configure.ac file. DEBUG_CFLAGS has been once set in the build files similarly to Zend.m4 but was then removed and simplified.
Also, this syncs phpize.m4 debug check with configure.ac so that #78788 is fixed there as well.
Related to: 0988f69
Edit: Marking this as draft PR, I'll recheck it again...
Edit 2: Marked as ready. I've changed that Zend.m4 changes back because they are needed in possible some edge cases when doing --enable-debug-assertions or using very customized and simplified CFLAGS override. So, let's leave them be then.