diff --git a/cmake/lite.cmake b/cmake/lite.cmake index 552e4e71f23e6a8fc5dd8297c51ca345d4621c25..18aa0f5f828621a7d90a73ecf5e4b3d013752137 100644 --- a/cmake/lite.cmake +++ b/cmake/lite.cmake @@ -165,11 +165,13 @@ function(lite_cc_binary TARGET) ) cc_binary(${TARGET} SRCS ${args_SRCS} DEPS ${deps} ${args_DEPS}) target_compile_options(${TARGET} BEFORE PRIVATE -Wno-ignored-qualifiers) - # strip binary target to reduce size - add_custom_command(TARGET ${TARGET} POST_BUILD - COMMAND "${CMAKE_STRIP}" -s - "${TARGET}" - COMMENT "Strip debug symbols done on final executable file.") + if (NOT APPLE) + # strip binary target to reduce size + add_custom_command(TARGET ${TARGET} POST_BUILD + COMMAND "${CMAKE_STRIP}" -s + "${TARGET}" + COMMENT "Strip debug symbols done on final executable file.") + endif() # collect targets need to compile for lite if (NOT args_EXCLUDE_COMPILE_DEPS) add_dependencies(lite_compile_deps ${TARGET}) diff --git a/lite/backends/arm/math/gemm_prepacked_int8.cc b/lite/backends/arm/math/gemm_prepacked_int8.cc index d7e04bfc60b1214bd1e77738efa420d3e25e1456..93dfdfe7d9bef911fa9363249971df65c84cc826 100644 --- a/lite/backends/arm/math/gemm_prepacked_int8.cc +++ b/lite/backends/arm/math/gemm_prepacked_int8.cc @@ -198,6 +198,7 @@ inline void gemm_int8_kernel(const int8_t* a_ptr, bool is_relu, int k, int rem); + // clang-format off #ifdef __aarch64__ #define GEMM_INT8_KERNEL \ diff --git a/lite/backends/x86/CMakeLists.txt b/lite/backends/x86/CMakeLists.txt index 34e08001307691e3d1b60a19210622a6800fe2be..63b41ae77d0f3949e3d1de13f9db5ca99b4f1c41 100644 --- a/lite/backends/x86/CMakeLists.txt +++ b/lite/backends/x86/CMakeLists.txt @@ -4,10 +4,12 @@ endif() configure_file(cupti_lib_path.h.in ${CMAKE_CURRENT_BINARY_DIR}/cupti_lib_path.h) configure_file(warpctc_lib_path.h.in ${CMAKE_CURRENT_BINARY_DIR}/warpctc_lib_path.h) - +lite_cc_library(target_wrapper_x86 SRCS target_wrapper.cc) +if (LITE_ON_MODEL_OPTIMIZE_TOOL) + return() +endif(LITE_ON_MODEL_OPTIMIZE_TOOL) lite_cc_library(dynamic_loader SRCS dynamic_loader.cc DEPS glog gflags) lite_cc_library(dynload_mklml SRCS mklml.cc DEPS dynamic_loader mklml) -lite_cc_library(target_wrapper_x86 SRCS target_wrapper.cc) lite_cc_library(x86_cpu_info SRCS cpu_info.cc DEPS xbyak) add_subdirectory(jit) diff --git a/lite/operators/range_op.cc b/lite/operators/range_op.cc index 1426e07d8cc312cd2181282559e5c5c70add0c4c..ccfbe18719058aab97b132d9c869d863f8008afa 100644 --- a/lite/operators/range_op.cc +++ b/lite/operators/range_op.cc @@ -13,6 +13,7 @@ // limitations under the License. #include "lite/operators/range_op.h" +#include #include #include "lite/core/op_registry.h" diff --git a/lite/tools/build.sh b/lite/tools/build.sh index 1ff5752dba45223060dd21677425dbc86434457b..d56a5f81cb87c84078c475caa634e54df7fd280f 100755 --- a/lite/tools/build.sh +++ b/lite/tools/build.sh @@ -56,8 +56,12 @@ function build_model_optimize_tool { prepare_thirdparty mkdir -p build.model_optimize_tool cd build.model_optimize_tool - cmake .. -DWITH_LITE=ON -DLITE_ON_MODEL_OPTIMIZE_TOOL=ON -DWITH_TESTING=OFF -DLITE_BUILD_EXTRA=ON - make model_optimize_tool -j$NUM_CORES_FOR_COMPILE + cmake .. -DWITH_LITE=ON \ + -DLITE_ON_MODEL_OPTIMIZE_TOOL=ON \ + -DWITH_TESTING=OFF \ + -DLITE_BUILD_EXTRA=ON \ + -DWITH_MKL=OFF + make model_optimize_tool -j$NUM_PROC } function make_tiny_publish_so {