pitrou commented on code in PR #41128:
URL: https://github.com/apache/arrow/pull/41128#discussion_r3412493288
##########
cpp/src/arrow/CMakeLists.txt:
##########
@@ -459,7 +459,25 @@ if(ARROW_JEMALLOC)
set_source_files_properties(memory_pool_jemalloc.cc
PROPERTIES SKIP_UNITY_BUILD_INCLUSION ON)
endif()
+if(ARROW_MIMALLOC)
+ list(APPEND ARROW_MEMORY_POOL_SRCS memory_pool_mimalloc.cc)
+ set_source_files_properties(memory_pool_mimalloc.cc
+ PROPERTIES SKIP_PRECOMPILE_HEADERS ON
+ SKIP_UNITY_BUILD_INCLUSION ON)
+endif()
+# GH-50083: make sure some allocation-related public symbols are interposable,
+# for the benefit of memory profilers and other runtime analyzers.
+# Ideally we would scope a specific subset of symbols, but it doesn't seem
+# easily doable. See `memory_pool_internal.h`.
+if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU"
+ OR CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang"
+ OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
+ set_source_files_properties(${ARROW_MEMORY_POOL_SRCS}
+ PROPERTIES COMPILE_OPTIONS
"-fsemantic-interposition")
+endif()
Review Comment:
Good point, I'll move this within the mimalloc-conditional block.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]