提交 92548e3a 编写于 作者: 刘琦

Merge branch 'add_version_script_docs' into 'master'

add version script docs

See merge request !676
......@@ -382,4 +382,4 @@ Reduce Library Size
library may also contain model graph and model datas if the configs ``model_graph_format`` and
``model_data_format`` in deployment file are set to ``code``.
- It is recommended to use ``version script`` for ultimate binary. The effect is remarkable.
- It is recommended to use ``version script`` and ``strip`` feature when linking mace static library. The effect is remarkable.
......@@ -192,7 +192,7 @@ Use bazel to build MACE source code into a library.
# output lib path: builds/lib
bash tools/build-standalone-lib.sh
The above command will generate dynamic library ``builds/lib/${ABI}/libmace.so`` and static library ``builds/lib/${ABI}/libmace.a``.
The above command will generate dynamic library ``builds/lib/${ABI}/${DEVICES}/libmace.so`` and static library ``builds/lib/${ABI}/${DEVICES}/libmace.a``.
.. warning::
......@@ -242,6 +242,12 @@ header files.
``${library_name}`` is the name you defined in the first line of your deployment YAML file.
.. note::
When linking generated ``libmace.a`` into shared library,
`version script <ftp://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_node/ld_25.html>`__
is helpful for reducing a specified set of symbols to local scope.
- The generated ``static`` library files are organized as follows,
.. code::
......@@ -254,12 +260,17 @@ header files.
│   └── mace_runtime.h
├── lib
│   ├── arm64-v8a
│   │   ├── libmace.a
│   │   └── libmace.so
│   │ └── cpu_gpu
│   │   ├── libmace.a
│   │   └── libmace.so
│   ├── armeabi-v7a
│   │   ├── libhexagon_controller.so
│   │   ├── libmace.a
│   │   └── libmace.so
│   │ ├── cpu_gpu
│   │   │ ├── libmace.a
│   │   │ └── libmace.so
│   │ └── cpu_gpu_dsp
│   │   ├── libhexagon_controller.so
│   │   ├── libmace.a
│   │   └── libmace.so
│   └── linux-x86-64
│   ├── libmace.a
│   └── libmace.so
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册