Hello Alexey Serbin, Andrew Wong, Grant Henke,
I'd like you to do a code review. Please visit
http://gerrit.cloudera.org:8080/15492
to review the following change.
Change subject: WIP: iwyu: standardize on libc++
......................................................................
WIP: iwyu: standardize on libc++
A common IWYU pain point is that the set of recommendations you get for C++
standard library headers differs depending on the system you run on.
Pre-commit currently uses Ubuntu 14.10, so to guarantee a pass in pre-commit
one must run IWYU on an Ubuntu 14.10 VM.
Instead, let's standardize on libc++ for C++ standard library headers. Even
though Kudu itself is built against the local libstdc++, the standard
library classes we use should be available in the same "public" headers
regardless of implementation. And this way, all runs of IWYU will produce
the same recommendations.
A more complete solution would be to standardize _all_ of Kudu on clang and
libc++. That's a larger piece of work with its own issues (e.g. is it safe
to statically link libc++ into the C++ client library?).
As with anything related to IWYU, some mappings had to be massaged, both for
libc++ itself as well as interesting things I noticed on my local system.
Note: strictly speaking we don't need to _build_ libc++, but it's a quick
build and this is the easiest way to get the appropriate set of headers into
thirdparty/installed/<prefix>/include.
WIP because some of the recommendations are still wonky. For example, IWYU
wants us to include <new> in every file that uses operator new. At first I
mapped this to <memory>, but that's not actually correct. Then I tried to
suppress the recommendation, but that's only possible with
"IWYU pragma: no_include" in each affected file, which is even worse. Seems
like some codebases are comfortable including <new> for such usage; should
we follow suit?
Change-Id: Ic807745271642b3d5d80ea0ad9bc413bdb0e34b5
---
M build-support/iwyu.py
M build-support/iwyu/iwyu_tool.py
A build-support/iwyu/mappings/libcxx-extra.imp
A build-support/iwyu/mappings/libcxx.imp
M build-support/iwyu/mappings/system-linux.imp
M src/kudu/util/thread.cc
M thirdparty/build-definitions.sh
M thirdparty/build-thirdparty.sh
8 files changed, 153 insertions(+), 39 deletions(-)
git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/92/15492/1
--
To view, visit http://gerrit.cloudera.org:8080/15492
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic807745271642b3d5d80ea0ad9bc413bdb0e34b5
Gerrit-Change-Number: 15492
Gerrit-PatchSet: 1
Gerrit-Owner: Adar Dembo <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Andrew Wong <[email protected]>
Gerrit-Reviewer: Grant Henke <[email protected]>