未验证 提交 4f307a7e 编写于 作者: Q Qi Li 提交者: GitHub

[ARM] fix arm build failure with Ninja build, test=develop (#55548)

上级 c3080386
...@@ -82,6 +82,9 @@ if(NOT WIN32) ...@@ -82,6 +82,9 @@ if(NOT WIN32)
set(OPTIONAL_ARGS DYNAMIC_ARCH=1 NUM_THREADS=64) set(OPTIONAL_ARGS DYNAMIC_ARCH=1 NUM_THREADS=64)
endif() endif()
if(WITH_ARM)
set(ARM_ARGS TARGET=ARMV8)
endif()
set(COMMON_ARGS CC=${OPENBLAS_CC} NO_SHARED=1 NO_LAPACK=1 libs) set(COMMON_ARGS CC=${OPENBLAS_CC} NO_SHARED=1 NO_LAPACK=1 libs)
ExternalProject_Add( ExternalProject_Add(
extern_openblas extern_openblas
...@@ -90,7 +93,7 @@ if(NOT WIN32) ...@@ -90,7 +93,7 @@ if(NOT WIN32)
PREFIX ${CBLAS_PREFIX_DIR} PREFIX ${CBLAS_PREFIX_DIR}
INSTALL_DIR ${CBLAS_INSTALL_DIR} INSTALL_DIR ${CBLAS_INSTALL_DIR}
BUILD_IN_SOURCE 1 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=<INSTALL_DIR> INSTALL_COMMAND make install NO_SHARED=1 NO_LAPACK=1 PREFIX=<INSTALL_DIR>
UPDATE_COMMAND "" UPDATE_COMMAND ""
CONFIGURE_COMMAND "" CONFIGURE_COMMAND ""
......
...@@ -79,11 +79,9 @@ set(CMAKE_CXX_LINK_EXECUTABLE ...@@ -79,11 +79,9 @@ set(CMAKE_CXX_LINK_EXECUTABLE
if(WITH_ARM) if(WITH_ARM)
file(TO_NATIVE_PATH ${PADDLE_SOURCE_DIR}/patches/rocksdb/libaio.h.patch file(TO_NATIVE_PATH ${PADDLE_SOURCE_DIR}/patches/rocksdb/libaio.h.patch
native_src) native_src)
# See: [Why calling some `git` commands before `patch`?]
set(ROCKSDB_PATCH_COMMAND set(ROCKSDB_PATCH_COMMAND
git checkout -- . && git checkout 6.19.fb && patch -Nd git checkout -- . && git checkout ${ROCKSDB_TAG} && patch -Nd
${CMAKE_BINARY_DIR}/third_party/rocksdb/src/extern_rocksdb/env < ${PADDLE_SOURCE_DIR}/third_party/rocksdb/env/ < ${native_src})
${native_src})
endif() endif()
ExternalProject_Add( ExternalProject_Add(
extern_rocksdb extern_rocksdb
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册