Repository: kudu Updated Branches: refs/heads/master 1069aaae2 -> 7327c28b2
Add support for clang from XCode 8 in macOS Since upgrading XCode to 8 (even in El Capitan), cmake has outputted an unsupported compiler message: Unknown compiler. Version info: Apple LLVM version 8.0.0 (clang-800.0.38) Target: x86_64-apple-darwin16.0.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin This is also the default version in the new macOS Sierra. This patch fixes this by adding it to the list of supported compilers. Note that this patch, by itself, won't allow to fully compile Kudu in macOS Sierra, as the current version of tcmalloc is incompatible: https://github.com/gperftools/gperftools/issues/827 We need to wait until the issue above is fixed in order to fully support building with the default toolchain in macOS Sierra. In the meanwhile this patch is still valuable. It's still possible to build Kudu with the clang toolchain we ship and CLion users can still use the default toolchain, as long as they don't actually run the CLion build's binaries. Were we to change to jemalloc, that issue is solved there: https://github.com/jemalloc/jemalloc/pull/427 Change-Id: I74574fb80525c7b7545e2aaf9b220f63486a46b6 Reviewed-on: http://gerrit.cloudera.org:8080/4482 Reviewed-by: Dan Burkert <[email protected]> Tested-by: Kudu Jenkins Project: http://git-wip-us.apache.org/repos/asf/kudu/repo Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/2e0f669e Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/2e0f669e Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/2e0f669e Branch: refs/heads/master Commit: 2e0f669ea0e75df87bbbdc631895538d0b6303e3 Parents: 1069aaa Author: David Alves <[email protected]> Authored: Tue Sep 20 14:37:02 2016 -0700 Committer: David Ribeiro Alves <[email protected]> Committed: Tue Sep 20 22:59:56 2016 +0000 ---------------------------------------------------------------------- cmake_modules/CompilerInfo.cmake | 5 +++++ 1 file changed, 5 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kudu/blob/2e0f669e/cmake_modules/CompilerInfo.cmake ---------------------------------------------------------------------- diff --git a/cmake_modules/CompilerInfo.cmake b/cmake_modules/CompilerInfo.cmake index d77080c..80aeb2f 100644 --- a/cmake_modules/CompilerInfo.cmake +++ b/cmake_modules/CompilerInfo.cmake @@ -37,6 +37,11 @@ elseif("${COMPILER_VERSION_FULL}" MATCHES ".*clang-7") set(COMPILER_FAMILY "clang") set(COMPILER_VERSION "3.7.0svn") +# clang on Mac OS X, XCode 8. +elseif("${COMPILER_VERSION_FULL}" MATCHES ".*clang-8") + set(COMPILER_FAMILY "clang") + set(COMPILER_VERSION "3.8.0svn") + # gcc elseif("${COMPILER_VERSION_FULL}" MATCHES ".*gcc version.*") set(COMPILER_FAMILY "gcc")
