Skip to content

Commit

Permalink
Disable folly memcpy as default memcpy (#5996)
Browse files Browse the repository at this point in the history
close #5949
  • Loading branch information
solotzg authored Sep 22, 2022
1 parent 72c191e commit bd16255
Showing 1 changed file with 4 additions and 3 deletions.
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

0 comments on commit bd16255

Please sign in to comment.