Skip to content

Commit

Permalink
fix code style
Browse files Browse the repository at this point in the history
  • Loading branch information
DefTruth committed Dec 2, 2022
1 parent f31f7c9 commit ae64862
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fast_tokenizer/docs/compile/how_to_build_android.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ export NDK_ROOT=${PWD}/android-ndk-r20b
git clone https://github.com/PaddlePaddle/PaddleNLP.git
cd PaddleNLP/fast_tokenizer
mkdir build & cd build
cmake .. -DCMAKE_TOOLCHAIN_FILE=$NDK_ROOT/build/cmake/android.toolchain.cmake -DANDROID_ABI="arm64-v8a" -DANDROID_NATIVE_API_LEVEL=android-21 -DANDROID_STL=c++_static -DWITH_TESTING=OFF -DWITH_PYTHON=OFF -DANDROID_TOOLCHAIN=clang
cmake .. -DCMAKE_TOOLCHAIN_FILE=$NDK_ROOT/build/cmake/android.toolchain.cmake -DANDROID_ABI="arm64-v8a" -DANDROID_NATIVE_API_LEVEL=android-21 -DANDROID_STL=c++_static -DWITH_TESTING=OFF -DWITH_PYTHON=OFF -DANDROID_TOOLCHAIN=clang
make -j8
```
编译后的C++库在当前目录下的`cpp`目录下。可以选择使用strip减少库体积
编译后的C++库在当前目录下的`cpp`目录下。可以选择使用strip减少库体积:
```shell
$NDK_ROOT/toolchains/llvm/prebuilt/linux-x86_64/aarch64-linux-android/bin/strip libcore_tokenizers.so
```
Expand Down

0 comments on commit ae64862

Please sign in to comment.