Todd Lipcon has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/9898


Change subject: Upgrade to LLVM/Clang 6.0.0
......................................................................

Upgrade to LLVM/Clang 6.0.0

This patch contains various changes required to upgrade to LLVM 6:

Thirdparty build changes:
- Bumped the actual version of LLVM and IWYU to 6.0.0 and 0.9
  respectively.

- Rejiggered the set of patches to apply:
-- Recreated the amazon-linux toolchain support patch (same content,
   just needed to be rebased)
-- Removed "fix-readability-redundant-declaration..." patch which is now
   incorporated upstream.
-- Updated the existing IWYU patches slightly just to keep them
   applying.
-- Pulled in a patch from IWYU github to have it build against LLVM 6.

- Along the way, updated the 'package-llvm.sh' script to include
  packaging IWYU.

- Changed the cmake invocation to disable the build of a bunch of tools
  which are not really necessary in our use case. This sped up the build
  a little bit.

- Changed the sanitized LLVM library build to use the uninstrumented
  'llvm-tblgen' tool from the already-built toolchain to speed it up a
  bit.

- Had to rejigger some flags a bit: --stdlib=libc++ is a linker flag
  rather than a CXXFLAG, so moved it to LDFLAGS and ensured that it was
  passed in the right spot. The new version of the LLVM build was
  complaining about unused arguments without this.

- Disabled the build of the "Hello" pass example. For some reason this
  was failing to link in our TSAN configuration with the following error:
     : && /home/todd/kudu/build-support/ccache-clang/clang++ -fPIC 
-DTHREAD_SANITIZER -fsanitize=thread -isystem 
/home/todd/kudu/thirdparty/installed/tsan/include/c++/v1  
-fno-omit-frame-pointer -O2 -stdlib=libc++ -fPIC -fvisibility-inlines-hidden 
-Werror=date-time -Werror=unguarded-availability-new -std=c++11 -Wall -W 
-Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers 
-pedantic -Wno-long-long -Wcovered-switch-default -Wnon-virtual-dtor 
-Wdelete-non-virtual-dtor -Wstring-conversion -fno-omit-frame-pointer 
-gline-tables-only -fsanitize=thread -fcolor-diagnostics -ffunction-sections 
-fdata-sections -O3 -DNDEBUG  -stdlib=libc++   
-Wl,-rpath-link,/home/todd/kudu/thirdparty/build/llvm-6.0.0.tsan/./lib  -Wl,-O3 
-Wl,--gc-sections  
-Wl,--version-script,/home/todd/kudu/thirdparty/build/llvm-6.0.0.tsan/lib/Transforms/Hello/LLVMHello.exports
 -shared  -o lib/LLVMHello.so 
lib/Transforms/Hello/CMakeFiles/LLVMHello.dir/Hello.cpp.o  
-Wl,-rpath,"\$ORIGIN/../lib" && :
    /usr/bin/ld: cannot find -lc++

  I spent a while trying to figure out the issue and came up short, so
  just removed it from the build.

- Added a small patch to libunwind which fixed a crash in TSAN. See the
  patch file header itself for details.

Code changes:

- A few trivial API changes in the codegen module.
-- I verified that the resulting generated assembly is not larger than
   the old assembly. In fact it seems to have shaved off a couple
   instructions (CodegenTest.TestDumpMC lost two instructions)

- Added the appropriate function attribute to disable frame pointer
  elimination. This was apparently the default in previous releases
  of LLVM but now needs to be set explicitly as a function attribute
  on every function in the module. I verified that with this change
  there is a 'push %rbp' and 'pop %rbp' in the machine code emitted
  by CodegenTest.TestDumpMC, which matches the results with LLVM 4.

- Added _ULx86_64_step to tsan-suppressions. This appears to be a
  possible race which is caught by the new version of TSAN.

Change-Id: I137180f0b167872d903d855282607bac17f92a83
---
M build-support/tsan-suppressions.txt
M src/kudu/codegen/module_builder.cc
M src/kudu/codegen/row_projector.cc
M thirdparty/build-definitions.sh
M thirdparty/build-thirdparty.sh
M thirdparty/download-thirdparty.sh
M thirdparty/package-llvm.sh
A thirdparty/patches/libunwind-trace-cache-destructor.patch
M thirdparty/patches/llvm-fix-amazon-linux.patch
D 
thirdparty/patches/llvm-fix-readability-redundant-declaration-false-positive.patch
A thirdparty/patches/llvm-iwyu-llvm-6-compat.patch
M thirdparty/patches/llvm-iwyu-nocurses.patch
M thirdparty/vars.sh
13 files changed, 251 insertions(+), 143 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/98/9898/1
--
To view, visit http://gerrit.cloudera.org:8080/9898
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I137180f0b167872d903d855282607bac17f92a83
Gerrit-Change-Number: 9898
Gerrit-PatchSet: 1
Gerrit-Owner: Todd Lipcon <[email protected]>

Reply via email to