diff --git a/lite/api/CMakeLists.txt b/lite/api/CMakeLists.txt index fc6d2dd66b8b830ac83e8cfb67f72eb411649895..9f46cdaefdc70f1db318c07f82aab5b94aaa9863 100644 --- a/lite/api/CMakeLists.txt +++ b/lite/api/CMakeLists.txt @@ -9,12 +9,17 @@ if (LITE_ON_TINY_PUBLISH) set(CMAKE_C_FLAGS_RELEASE "-Os -DNDEBUG") endif() set(light_lib_DEPS light_api paddle_api paddle_api_light optimizer) -if ((NOT LITE_ON_TINY_PUBLISH) AND (ARM_TARGET_OS STREQUAL "android")) +if ((NOT LITE_ON_TINY_PUBLISH) AND (LITE_WITH_X86 OR ARM_TARGET_OS STREQUAL "android")) #full api dynamic library add_library(paddle_full_api_shared SHARED "") target_sources(paddle_full_api_shared PUBLIC ${__lite_cc_files} paddle_api.cc light_api.cc cxx_api.cc cxx_api_impl.cc light_api_impl.cc) add_dependencies(paddle_full_api_shared op_list_h kernel_list_h framework_proto) target_link_libraries(paddle_full_api_shared framework_proto) + add_dependencies(lite_compile_deps paddle_full_api_shared) + if(LITE_WITH_X86) + add_dependencies(paddle_full_api_shared xxhash) + target_link_libraries(paddle_full_api_shared xxhash) + endif() #light api dynamic library lite_cc_library(paddle_light_api_shared MODULE diff --git a/lite/fluid/lod.h b/lite/fluid/lod.h index 68068ba1d018ffd4fbd1b52ec3cd382326b7a69f..36386f7eb967f31ec258681fe17222a928aa7b4b 100644 --- a/lite/fluid/lod.h +++ b/lite/fluid/lod.h @@ -21,7 +21,7 @@ namespace lite { namespace fluid { using LoD = std::vector>; -LoD ToAbsOffset(const LoD &in) { +static LoD ToAbsOffset(const LoD &in) { // the lowest level stores relative offsets if (in.empty() || in.size() == 1) return in; LoD result = in;