You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by ta...@apache.org on 2016/05/18 21:40:39 UTC

incubator-impala git commit: Turn on C++14 in cross-compiled code

Repository: incubator-impala
Updated Branches:
  refs/heads/master f992dc7f8 -> cb2a3aacd


Turn on C++14 in cross-compiled code

Enabling this revealed a latent bug where a #include was wrapped in the
impala namespace, resulting in the functions being defined in the wrong
namespace.

Change-Id: If723167b2d03da7592b64a204e31e81ea868e4f2
Reviewed-on: http://gerrit.cloudera.org:8080/3024
Reviewed-by: Tim Armstrong <ta...@cloudera.com>
Tested-by: Internal Jenkins


Project: http://git-wip-us.apache.org/repos/asf/incubator-impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-impala/commit/cb2a3aac
Tree: http://git-wip-us.apache.org/repos/asf/incubator-impala/tree/cb2a3aac
Diff: http://git-wip-us.apache.org/repos/asf/incubator-impala/diff/cb2a3aac

Branch: refs/heads/master
Commit: cb2a3aacd6d1b9b36007164c3fcc925557cb45cd
Parents: f992dc7
Author: Tim Armstrong <ta...@cloudera.com>
Authored: Tue May 10 23:27:06 2016 -0700
Committer: Tim Armstrong <ta...@cloudera.com>
Committed: Wed May 18 14:40:34 2016 -0700

----------------------------------------------------------------------
 be/CMakeLists.txt      | 4 ++--
 be/src/util/sse-util.h | 6 ++++--
 2 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/cb2a3aac/be/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/be/CMakeLists.txt b/be/CMakeLists.txt
index 6ae5cd8..1043b0a 100644
--- a/be/CMakeLists.txt
+++ b/be/CMakeLists.txt
@@ -142,9 +142,9 @@ add_definitions(-DHAVE_INTTYPES_H -DHAVE_NETINET_IN_H -DHAVE_NETDB_H)
 #  -Wno-return-type-c-linkage: UDFs return C++ classes but use C linkage to prevent
 #       mangling
 #  -DBOOST_NO_EXCEPTIONS: call a custom error handler for exceptions in codegen'd code.
-set(CLANG_IR_CXX_FLAGS "-emit-llvm" "-c" "-DIR_COMPILE" "-DNDEBUG"
+set(CLANG_IR_CXX_FLAGS "-emit-llvm" "-c" "-std=c++14" "-DIR_COMPILE" "-DNDEBUG"
   "-DHAVE_INTTYPES_H" "-DHAVE_NETINET_IN_H" "-DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG"
-  "-DBOOST_NO_EXCEPTIONS" "-fcolor-diagnostics" "-Wno-deprecated" "-Wno-c++11-extensions"
+  "-DBOOST_NO_EXCEPTIONS" "-fcolor-diagnostics" "-Wno-deprecated"
   "-Wno-return-type-c-linkage" "-O1")
 if (IMPALA_TOOLCHAIN)
   # -Werror: compile warnings should be errors when using the toolchain compiler.

http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/cb2a3aac/be/src/util/sse-util.h
----------------------------------------------------------------------
diff --git a/be/src/util/sse-util.h b/be/src/util/sse-util.h
index 42f0f25..4eda694 100644
--- a/be/src/util/sse-util.h
+++ b/be/src/util/sse-util.h
@@ -18,6 +18,10 @@
 
 #include <emmintrin.h>
 
+#if defined(IR_COMPILE) && defined(__SSE4_2__) // IR_COMPILE for SSE 4.2.
+#include <smmintrin.h>
+#endif
+
 namespace impala {
 
 /// This class contains constants useful for text processing with SSE4.2 intrinsics.
@@ -145,8 +149,6 @@ static inline int64_t POPCNT_popcnt_u64(uint64_t a) {
 /// -msse4.2.  When -msse4.2 is enabled in the cross-compile, we can just use the
 /// compiler intrinsics.
 
-#include <smmintrin.h>
-
 template<int MODE>
 static inline __m128i SSE4_cmpestrm(
     __m128i str1, int len1, __m128i str2, int len2) {