diff --git a/cmake/external/openblas.cmake b/cmake/external/openblas.cmake index 8443a8a9f727c..f30dcd4d3014d 100644 --- a/cmake/external/openblas.cmake +++ b/cmake/external/openblas.cmake @@ -82,6 +82,9 @@ if(NOT WIN32) set(OPTIONAL_ARGS DYNAMIC_ARCH=1 NUM_THREADS=64) endif() + if(WITH_ARM) + set(ARM_ARGS TARGET=ARMV8) + endif() set(COMMON_ARGS CC=${OPENBLAS_CC} NO_SHARED=1 NO_LAPACK=1 libs) ExternalProject_Add( extern_openblas @@ -90,7 +93,7 @@ if(NOT WIN32) PREFIX ${CBLAS_PREFIX_DIR} INSTALL_DIR ${CBLAS_INSTALL_DIR} BUILD_IN_SOURCE 1 - BUILD_COMMAND make -j${NPROC} ${COMMON_ARGS} ${OPTIONAL_ARGS} + BUILD_COMMAND make ${ARM_ARGS} -j${NPROC} ${COMMON_ARGS} ${OPTIONAL_ARGS} INSTALL_COMMAND make install NO_SHARED=1 NO_LAPACK=1 PREFIX= UPDATE_COMMAND "" CONFIGURE_COMMAND "" diff --git a/cmake/external/rocksdb.cmake b/cmake/external/rocksdb.cmake index 69a5c240cc56e..98e9972e2706d 100644 --- a/cmake/external/rocksdb.cmake +++ b/cmake/external/rocksdb.cmake @@ -79,11 +79,9 @@ set(CMAKE_CXX_LINK_EXECUTABLE if(WITH_ARM) file(TO_NATIVE_PATH ${PADDLE_SOURCE_DIR}/patches/rocksdb/libaio.h.patch native_src) - # See: [Why calling some `git` commands before `patch`?] set(ROCKSDB_PATCH_COMMAND - git checkout -- . && git checkout 6.19.fb && patch -Nd - ${CMAKE_BINARY_DIR}/third_party/rocksdb/src/extern_rocksdb/env < - ${native_src}) + git checkout -- . && git checkout ${ROCKSDB_TAG} && patch -Nd + ${PADDLE_SOURCE_DIR}/third_party/rocksdb/env/ < ${native_src}) endif() ExternalProject_Add( extern_rocksdb