Dan Burkert has submitted this change and it was merged.
Change subject: thirdparty: stifle unused argument warnings when building with
thirdparty: stifle unused argument warnings when building with clang
Dan tested my various thirdparty patches on macOS and reported that clang
emits thousands of unused argument warnings when building llvm, gflags, and
gtest. The first is due to the use of EXTRA_LDFLAGS in the llvm build; the
others have always been there.
We can tackle this in one of two ways:
1. Add -Qunused-arguments to EXTRA_CXXFLAGS. This isn't as easy as it
sounds, because we need to restrict this to clang-based builds (gcc
doesn't recognize the parameter), and sometimes that happens via CC/CXX
environment variables and other times implicitly.
2. Narrow our prolific additions of -L... and -Wl,-rpath,... such that
they're only added when needed.
I chose approach #2, which also meant remembering all of our
interdependencies. As best I can tell, here is the complete list:
- glog depends on gflags
- glog depends on libunwind
- pmemobj depends on pmem
- bitshuffle depends on lz4
With such a short list, approach #2 isn't actually that bad. I tested it by
building thirdparty with my system's clang. It worked once I disabled
-Werror in the nvml build.
I tried very hard not to regress commit 2567ed0. My system should be using
gold, though I noticed that only the shared objects in
installed/tsan had RUNPATH entries; the ones in installed/uninstrumented and
installed/common used RPATH. Nevertheless, I ran both debug and tsan tests,
which should have exercised all of them.
Reviewed-by: Dan Burkert <d...@cloudera.com>
Tested-by: Dan Burkert <d...@cloudera.com>
2 files changed, 36 insertions(+), 22 deletions(-)
Dan Burkert: Looks good to me, approved; Verified
To view, visit http://gerrit.cloudera.org:8080/4514
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings
Gerrit-Owner: Adar Dembo <a...@cloudera.com>
Gerrit-Reviewer: Dan Burkert <d...@cloudera.com>
Gerrit-Reviewer: Kudu Jenkins
Gerrit-Reviewer: Todd Lipcon <t...@apache.org>