-
Notifications
You must be signed in to change notification settings - Fork 208
PHPC-1188, PHPC-1189, PHPC-1191: Revise maintainer/coverage configure #831
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
config.m4
Outdated
if test "$ext_shared" = "yes"; then | ||
MONGODB_SHARED_LIBADD="$MONGODB_SHARED_LIBADD $COVERAGE_LDFLAGS" | ||
else | ||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS $COVERAGE_LDFLAGS" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure that code coverage makes any sense for static builds, so I'm amenable to deleting this else
case.
In that case, we can also move PHP_ARG_ENABLE([coverage], ...)
into a conditional so it doesn't even show up for static builds. Let me know if that's also desirable and I can create a second ticket/commit with the change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would still show up I believe, as that's m4 talk which is done in the phpize stage, whereas the conditionals are done during the configure stage.
IMO it should show up, and say that we don't support it for static builds. If people select it, we should error out in this else case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created PHPC-1191 to track that change.
config.m4
Outdated
PHP_CHECK_GCC_ARG(-fprofile-arcs, COVERAGE_CFLAGS="$COVERAGE_CFLAGS -fprofile-arcs") | ||
PHP_CHECK_GCC_ARG(-ftest-coverage, COVERAGE_CFLAGS="$COVERAGE_CFLAGS -ftest-coverage") | ||
EXTRA_LDFLAGS="$COVERAGE_CFLAGS" | ||
COVERAGE_CFLAGS="--coverage -g" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also think we should change the option name from --enable-coverage to --enable-mongodb-coverage, in case it clashes with other extensions in static builds.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree wholeheartedly. I wanted to do that for maintainer flags as well.
Will open new tickets. Should we keep the old options around for BC or are you OK with changing these? They're mainly for internal use, so I don't have a problem with simply renaming them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy to ditch BC on these.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created PHPC-1189 to track this and will throw that commit into this PR.
https://jira.mongodb.org/browse/PHPC-1188
https://jira.mongodb.org/browse/PHPC-1189
https://jira.mongodb.org/browse/PHPC-1191