fix for dynamic overriding on macOS; add warning about C++ compilation (as that does not interact well with interpose)

This commit is contained in:
Daan 2022-04-07 16:12:16 -07:00
parent 82dd094ec4
commit 25ecec3c3b
3 changed files with 16 additions and 14 deletions

View file

@ -97,8 +97,8 @@ if(MI_OVERRIDE)
message(STATUS " WARNING: interpose usually also needs zone overriding (use -DMI_OSX_INTERPOSE=ON)")
endif()
endif()
if((NOT MI_USE_CXX) AND MI_OVERRIDE)
message(STATUS " WARNING: if overriding C++ new/delete, it is best to build mimalloc with a C++ compiler (use -DMI_USE_CXX=ON)")
if(MI_USE_CXX AND MI_OSX_INTERPOSE)
message(STATUS " WARNING: if dynamically overriding malloc/free, it is more reliable to build mimalloc as C code (use -DMI_USE_CXX=OFF)")
endif()
endif()
endif()