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

IWYU support (part 4): Fix release builds #27788

Merged
merged 2 commits into from
Jan 22, 2019

Conversation

jbytheway
Copy link
Contributor

Summary

SUMMARY: None

Purpose of change

The attempt at running IWYU led to some issues on release builds (see CI failures on #27713).

Describe the solution

  • Protect the include of <chrono>, which is only needed for release builds.
  • Deal with some fallout from Revert main.cpp SDL includes #27755, which confused IWYU, by not prohibiting main.cpp from including SDL_version.h.

The <chrono> header here is used only in RELEASE mode, so IWYU run with
debug mode options will want to delete it.  Guard the #include behind
RELEASE as well so that it isn't removed.
main.cpp needs to include SDL_version.h rather than SDL.h.  This change
allows IWYU to leave it rather than forcing it to change.
@ZhilkinSerg ZhilkinSerg added [C++] Changes (can be) made in C++. Previously named `Code` Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style labels Jan 22, 2019
@ZhilkinSerg ZhilkinSerg merged commit 3e21d66 into CleverRaven:master Jan 22, 2019
@jbytheway jbytheway deleted the iwyu_release_fixes branch January 22, 2019 22:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C++] Changes (can be) made in C++. Previously named `Code` Code: Infrastructure / Style / Static Analysis Code internal infrastructure and style
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants