File tree Expand file tree Collapse file tree 2 files changed +25
-3
lines changed
Expand file tree Collapse file tree 2 files changed +25
-3
lines changed Original file line number Diff line number Diff line change @@ -87,7 +87,15 @@ ADD_ARROW_LIB(plasma
8787
8888# The optimization flag -O3 is suggested by dlmalloc.c, which is #included in
8989# malloc.cc; we set it here regardless of whether we do a debug or release build.
90- set_source_files_properties (malloc.cc PROPERTIES COMPILE_FLAGS "-Wno-error -O3" )
90+ set_source_files_properties (malloc.cc PROPERTIES
91+ COMPILE_FLAGS "-Wno-error -O3" )
92+
93+ if ("${COMPILER_FAMILY} " STREQUAL "clang" )
94+ set_property (SOURCE malloc.cc
95+ APPEND_STRING
96+ PROPERTY COMPILE_FLAGS
97+ " -Wno-parentheses-equality -Wno-shorten-64-to-32" )
98+ endif ()
9199
92100add_executable (plasma_store store.cc)
93101target_link_libraries (plasma_store plasma_static)
Original file line number Diff line number Diff line change @@ -584,9 +584,21 @@ MAX_RELEASE_CHECK_RATE default: 4095 unless not HAVE_MMAP
584584/* The maximum possible size_t value has all bits set */
585585#define MAX_SIZE_T (~(size_t)0)
586586
587+ #if (defined(USE_RECURSIVE_LOCKS ) && USE_RECURSIVE_LOCKS != 0 )
588+ #define RECURSIVE_LOCKS_ENABLED 1
589+ #else
590+ #define RECURSIVE_LOCKS_ENABLED 0
591+ #endif
592+
593+ #if (defined(USE_RECURSIVE_LOCKS ) && USE_RECURSIVE_LOCKS != 0 )
594+ #define SPIN_LOCKS_ENABLED 1
595+ #else
596+ #define SPIN_LOCKS_ENABLED 0
597+ #endif
598+
587599#ifndef USE_LOCKS /* ensure true if spin or recursive locks set */
588- #define USE_LOCKS ((defined(USE_SPIN_LOCKS) && USE_SPIN_LOCKS != 0) || \
589- (defined(USE_RECURSIVE_LOCKS) && USE_RECURSIVE_LOCKS != 0))
600+ #define USE_LOCKS ((SPIN_LOCKS_ENABLED != 0) || \
601+ (RECURSIVE_LOCKS_ENABLED != 0))
590602#endif /* USE_LOCKS */
591603
592604#if USE_LOCKS /* Spin locks for gcc >= 4.1, older gcc on x86, MSC >= 1310 */
@@ -645,7 +657,9 @@ MAX_RELEASE_CHECK_RATE default: 4095 unless not HAVE_MMAP
645657#ifndef HAVE_MREMAP
646658#ifdef linux
647659#define HAVE_MREMAP 1
660+ #ifndef _GNU_SOURCE
648661#define _GNU_SOURCE /* Turns on mremap() definition */
662+ #endif /* _GNU_SOURCE */
649663#else /* linux */
650664#define HAVE_MREMAP 0
651665#endif /* linux */
You can’t perform that action at this time.
0 commit comments