Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable folly memcpy as default memcpy (#5996) #6001

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions libs/libmemcpy/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

option(TIFLASH_FOLLY_MEMCPY_IS_MEMCPY "use folly memcpy as default `memcpy` and `memmove`" ON)
# TODO: optimize for small size memory
option(USE_FOLLY_MEMCPY_AS_MEMCPY "use folly memcpy as default `memcpy` and `memmove`" OFF)

set (memcpy_sources)

Expand All @@ -24,11 +25,11 @@ if (ARCH_LINUX AND TIFLASH_ENABLE_AVX_SUPPORT)
list (APPEND memcpy_sources folly/memcpy.S)
message (STATUS "`libmemcpy` support Folly memcpy")
else ()
set (TIFLASH_FOLLY_MEMCPY_IS_MEMCPY OFF)
set (USE_FOLLY_MEMCPY_AS_MEMCPY OFF)
endif ()

if (USE_INTERNAL_MEMCPY)
if (TIFLASH_FOLLY_MEMCPY_IS_MEMCPY)
if (USE_FOLLY_MEMCPY_AS_MEMCPY)
message (STATUS "Using Folly memcpy as default `memcpy` and `memmove`")
add_definitions(-DFOLLY_MEMCPY_IS_MEMCPY=1)
else ()
Expand Down