Adar Dembo has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/10469 )
Change subject: thirdparty: clean up unused argument warnings ...................................................................... thirdparty: clean up unused argument warnings Commit ba3cdea53 revved breakpad to a hash that includes -Werror in its build. This exposed an issue with non-ccache thirdparty builds: it turns out that clang has been emitting a lot of warnings about unused arguments when building TSAN dependencies, and those warnings now break breakpad when built for TSAN. Builds that use ccache don't emit those warnings because the build-support/ccache-clang scripts add -Qunused-arguments to the clang command line. We could fix this by patching out -Werror in breakpad, but that's not particularly robust; whose to say that -Werror won't show up in another dependency in the future? So instead, this patch tries to clean up those unused argument warnings. The core issue is the use of -stdlib=libc++ and -nostdinc++. Apparently the former is intended to be a linker option and thus shouldn't be part of CXXFLAGS, while the latter is a compiler option. So this patch moves -stdlib=libc++ to LDFLAGS. We're also now passing LDFLAGS into CMAKE_SHARED_LINKER_FLAGS and CMAKE_MODULE_LINKER_FLAGS; this allowed LLVMHello.so to find libc++ in the LLVM build. Sadly, I couldn't get rid of all the unused argument warnings. The problem is that clang warns about -nostdinc++ when it's passed to the linker, and setting it in CMAKE_CXX_FLAGS does just that. So I ended up adding -Qunused-arguments anyway. I tested this with a full thirdparty build without ccache on Ubuntu 16.04 as well as full builds on CentOS 6.6 and Ubuntu 18.04 with ccache. Change-Id: Ie1f7a4b8d11dc3f820259bce9819755f68339854 Reviewed-on: http://gerrit.cloudera.org:8080/10469 Tested-by: Kudu Jenkins Reviewed-by: Dan Burkert <[email protected]> --- M thirdparty/build-definitions.sh M thirdparty/build-thirdparty.sh 2 files changed, 36 insertions(+), 18 deletions(-) Approvals: Kudu Jenkins: Verified Dan Burkert: Looks good to me, approved -- To view, visit http://gerrit.cloudera.org:8080/10469 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ie1f7a4b8d11dc3f820259bce9819755f68339854 Gerrit-Change-Number: 10469 Gerrit-PatchSet: 2 Gerrit-Owner: Adar Dembo <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Dan Burkert <[email protected]> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Todd Lipcon <[email protected]>
