Skip to content

Instantly share code, notes, and snippets.

@cyrusbehr
Last active November 28, 2019 00:13
Show Gist options
  • Save cyrusbehr/d729d448789651de4594a60e766b1f66 to your computer and use it in GitHub Desktop.
Save cyrusbehr/d729d448789651de4594a60e766b1f66 to your computer and use it in GitHub Desktop.
Cross compile NCNN for AArch32 and AArch64
####################
# build for aarch32
####################
mkdir build_aarch32
cd build_aarch32
cmake -D NCNN_BUILD_TOOLS=OFF -D NCNN_VULKAN=OFF -D CMAKE_BUILD_TYPE=Release -D NCNN_DISABLE_RTTI=OFF -D CMAKE_TOOLCHAIN_FILE=../toolchains/arm-linux-gnueabihf.toolchain.cmake ..
make -j$(nproc)
make install
####################
# build for aarch64
####################
mkdir build_aarch64
cd build_aarch64
cmake -D NCNN_BUILD_TOOLS=OFF -D NCNN_VULKAN=OFF -D CMAKE_BUILD_TYPE=Release -D NCNN_DISABLE_RTTI=OFF -D CMAKE_TOOLCHAIN_FILE=../toolchains/aarch64-linux-gnu.toolchain.cmake ..
make -j$(nproc)
make install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment