You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by we...@apache.org on 2017/07/26 01:46:50 UTC
arrow git commit: ARROW-1258: [C++] Suppress Clang dlmalloc compiler
warnings
Repository: arrow
Updated Branches:
refs/heads/master f90fa4971 -> e9e17b56a
ARROW-1258: [C++] Suppress Clang dlmalloc compiler warnings
cc @pcmoritz
Author: Wes McKinney <we...@twosigma.com>
Closes #889 from wesm/ARROW-1258 and squashes the following commits:
e9ecf109 [Wes McKinney] Set -Wno-conversion for dlmalloc on gcc builds
3a4ee476 [Wes McKinney] Suppress Clang dlmalloc compiler warnings
Project: http://git-wip-us.apache.org/repos/asf/arrow/repo
Commit: http://git-wip-us.apache.org/repos/asf/arrow/commit/e9e17b56
Tree: http://git-wip-us.apache.org/repos/asf/arrow/tree/e9e17b56
Diff: http://git-wip-us.apache.org/repos/asf/arrow/diff/e9e17b56
Branch: refs/heads/master
Commit: e9e17b56aede6987aba84a414629b7aeb1ab1403
Parents: f90fa49
Author: Wes McKinney <we...@twosigma.com>
Authored: Tue Jul 25 21:46:45 2017 -0400
Committer: Wes McKinney <we...@twosigma.com>
Committed: Tue Jul 25 21:46:45 2017 -0400
----------------------------------------------------------------------
cpp/src/plasma/CMakeLists.txt | 17 ++++++++++++++++-
cpp/src/plasma/thirdparty/dlmalloc.c | 19 +++++++++++++++++--
2 files changed, 33 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/arrow/blob/e9e17b56/cpp/src/plasma/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/cpp/src/plasma/CMakeLists.txt b/cpp/src/plasma/CMakeLists.txt
index 8bb7e71..7e91202 100644
--- a/cpp/src/plasma/CMakeLists.txt
+++ b/cpp/src/plasma/CMakeLists.txt
@@ -87,7 +87,22 @@ ADD_ARROW_LIB(plasma
# The optimization flag -O3 is suggested by dlmalloc.c, which is #included in
# malloc.cc; we set it here regardless of whether we do a debug or release build.
-set_source_files_properties(malloc.cc PROPERTIES COMPILE_FLAGS "-Wno-error -O3")
+set_source_files_properties(malloc.cc PROPERTIES
+ COMPILE_FLAGS "-O3")
+
+if ("${COMPILER_FAMILY}" STREQUAL "clang")
+ set_property(SOURCE malloc.cc
+ APPEND_STRING
+ PROPERTY COMPILE_FLAGS
+ " -Wno-parentheses-equality -Wno-shorten-64-to-32")
+endif()
+
+if ("${COMPILER_FAMILY}" STREQUAL "gcc")
+ set_property(SOURCE malloc.cc
+ APPEND_STRING
+ PROPERTY COMPILE_FLAGS
+ " -Wno-conversion")
+endif()
add_executable(plasma_store store.cc)
target_link_libraries(plasma_store plasma_static)
http://git-wip-us.apache.org/repos/asf/arrow/blob/e9e17b56/cpp/src/plasma/thirdparty/dlmalloc.c
----------------------------------------------------------------------
diff --git a/cpp/src/plasma/thirdparty/dlmalloc.c b/cpp/src/plasma/thirdparty/dlmalloc.c
index 84ccbd2..7f3fd63 100644
--- a/cpp/src/plasma/thirdparty/dlmalloc.c
+++ b/cpp/src/plasma/thirdparty/dlmalloc.c
@@ -521,6 +521,7 @@ MAX_RELEASE_CHECK_RATE default: 4095 unless not HAVE_MMAP
improvement at the expense of carrying around more memory.
*/
+
/* Version identifier to allow people to support multiple versions */
#ifndef DLMALLOC_VERSION
#define DLMALLOC_VERSION 20806
@@ -584,9 +585,21 @@ MAX_RELEASE_CHECK_RATE default: 4095 unless not HAVE_MMAP
/* The maximum possible size_t value has all bits set */
#define MAX_SIZE_T (~(size_t)0)
+#if (defined(USE_RECURSIVE_LOCKS) && USE_RECURSIVE_LOCKS != 0)
+#define RECURSIVE_LOCKS_ENABLED 1
+#else
+#define RECURSIVE_LOCKS_ENABLED 0
+#endif
+
+#if (defined(USE_RECURSIVE_LOCKS) && USE_RECURSIVE_LOCKS != 0)
+#define SPIN_LOCKS_ENABLED 1
+#else
+#define SPIN_LOCKS_ENABLED 0
+#endif
+
#ifndef USE_LOCKS /* ensure true if spin or recursive locks set */
-#define USE_LOCKS ((defined(USE_SPIN_LOCKS) && USE_SPIN_LOCKS != 0) || \
- (defined(USE_RECURSIVE_LOCKS) && USE_RECURSIVE_LOCKS != 0))
+#define USE_LOCKS ((SPIN_LOCKS_ENABLED != 0) || \
+ (RECURSIVE_LOCKS_ENABLED != 0))
#endif /* USE_LOCKS */
#if USE_LOCKS /* Spin locks for gcc >= 4.1, older gcc on x86, MSC >= 1310 */
@@ -645,7 +658,9 @@ MAX_RELEASE_CHECK_RATE default: 4095 unless not HAVE_MMAP
#ifndef HAVE_MREMAP
#ifdef linux
#define HAVE_MREMAP 1
+#ifndef _GNU_SOURCE
#define _GNU_SOURCE /* Turns on mremap() definition */
+#endif /* _GNU_SOURCE */
#else /* linux */
#define HAVE_MREMAP 0
#endif /* linux */