Skip to content

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

Merged
merged 3 commits into from
May 15, 2018

Conversation

jmikola
Copy link
Member

@jmikola jmikola commented May 14, 2018

@jmikola jmikola requested a review from derickr May 14, 2018 21:55
config.m4 Outdated
if test "$ext_shared" = "yes"; then
MONGODB_SHARED_LIBADD="$MONGODB_SHARED_LIBADD $COVERAGE_LDFLAGS"
else
EXTRA_LDFLAGS="$EXTRA_LDFLAGS $COVERAGE_LDFLAGS"
Copy link
Member Author

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.

Copy link
Contributor

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.

Copy link
Member Author

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"
Copy link
Contributor

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.

Copy link
Member Author

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.

Copy link
Contributor

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.

Copy link
Member Author

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.

@jmikola jmikola changed the title PHPC-1188: Use --coverage option for code coverage builds PHPC-1188, PHPC-1189, PHPC-1191: Revise maintainer/coverage configure May 15, 2018
@jmikola jmikola merged commit da72946 into mongodb:master May 15, 2018
jmikola added a commit that referenced this pull request May 15, 2018
@jmikola jmikola deleted the phpc-1188 branch May 15, 2018 20:21
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.

2 participants