[Android] support fastdeploy build with static deps(60Mb->29~31Mb) (#1176)

* [Android] support fastdeploy build with static deps(70Mb->17~19Mb)

* [Android] support fastdeploy build with static deps(60Mb->29~30Mb)

* fixed ci

* fixed ci

* [staticlib] support fd android static lib

* [static] optimize bundle_static_library func

* [staticlib] add api_helpers.h -> staticlib headers

* [staticlib] add api_helpers.h -> staticlib headers

* [staticlib] add api_helpers.h -> staticlib headers

* [staticlib] Fixed Paddle Lite paddle_use_kernels.h to support fd armv7 static lib

* [staticlib] Add strip -> fd static lib target

* [staticlib] optimize bundle_static_library func

* [staticlib] add strip for fd static lib on  mac osx

* [staticlib] move api_helpers -> lite/option

* [staticlib] optimize bundle_static_library

* [staticlib] add Android limit
This commit is contained in:
DefTruth
2023-01-30 19:39:56 +08:00
committed by GitHub
parent 595ca69251
commit 2613e9c5d0
19 changed files with 918 additions and 97 deletions

View File

@@ -13,6 +13,23 @@
// limitations under the License.
#include "fastdeploy/runtime/backends/lite/lite_backend.h"
// https://github.com/PaddlePaddle/Paddle-Lite/issues/8290
// When compiling the FastDeploy dynamic library, namely,
// WITH_STATIC_LIB=OFF, and depending on the Paddle Lite
// static library, you need to include the fake registration
// codes of Paddle Lite. When you compile the FastDeploy static
// library and depends on the Paddle Lite static library,
// WITH_STATIC_LIB=ON, you do not need to include the fake
// registration codes for Paddle Lite, but wait until you
// use the FastDeploy static library.
#if (defined(WITH_LITE_STATIC) && (!defined(WITH_STATIC_LIB)))
#warning You are compiling the FastDeploy dynamic library with \
Paddle Lite static lib We will automatically add some registration \
codes for ops, kernels and passes for Paddle Lite.
#include "paddle_use_ops.h" // NOLINT
#include "paddle_use_kernels.h" // NOLINT
#include "paddle_use_passes.h" // NOLINT
#endif
#include <cstring>