Hello Dan Burkert, Todd Lipcon,

I'd like you to do a code review.  Please visit

    http://gerrit.cloudera.org:8080/7463

to review the following change.

Change subject: KUDU-2068: pass --gcc-toolchain into clang codegen build
......................................................................

KUDU-2068: pass --gcc-toolchain into clang codegen build

As a brief refresher: Kudu can be built using various versions of gcc and
clang, but the codegen build always uses clang from thirdparty.

Without this patch, we delegate finding the system header/library prefix to
clang. The problem is that the result isn't guaranteed to match the prefix
used by the compiler building the rest of Kudu, which may lead to obscure
runtime errors due to std:: class layout mismatches. Kudu consumers using
custom toolchains have been forced to work around this issue [1].

I tested this in the following environments:
- gcc 5.4 system compiler on Ubuntu 16 (--prefix=/usr).
- gcc 4.9 devtoolset-3 compiler on CentOS 6.6
  (--prefix=/opt/rh/devtoolset-3/root/usr).
- clang 4.0 thirdparty compiler on Ubuntu 16 (no --prefix).

1. 
https://github.com/cloudera/native-toolchain/blob/f0105fd35527f416799acb4aa92a887cbf511ce5/source/kudu/build.sh

Change-Id: Id3ccb129432e3915401ca7f1f815ddb355faf597
---
M CMakeLists.txt
M cmake_modules/CompilerInfo.cmake
M src/kudu/codegen/CMakeLists.txt
3 files changed, 21 insertions(+), 7 deletions(-)


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id3ccb129432e3915401ca7f1f815ddb355faf597
Gerrit-PatchSet: 1
Gerrit-Project: kudu
Gerrit-Branch: master
Gerrit-Owner: Adar Dembo <[email protected]>
Gerrit-Reviewer: Dan Burkert <[email protected]>
Gerrit-Reviewer: Todd Lipcon <[email protected]>

Reply via email to