From 813f17ba51bf1f4e0e392ce1058a1bbdaff43721 Mon Sep 17 00:00:00 2001 From: ysh329 Date: Fri, 10 Jul 2020 09:31:35 +0800 Subject: [PATCH] [cherry-pick] Fix abnormal exit for opencl build (#3917) * [LITE][COMPILE] Fix clang compile slow for arm cpu and abnormal exit for opencl. test=develop (#3763) --- cmake/cross_compiling/postproject.cmake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmake/cross_compiling/postproject.cmake b/cmake/cross_compiling/postproject.cmake index 3db715ba74..069923c779 100644 --- a/cmake/cross_compiling/postproject.cmake +++ b/cmake/cross_compiling/postproject.cmake @@ -71,6 +71,12 @@ if (LITE_ON_TINY_PUBLISH) check_linker_flag(-Wl,--gc-sections) endif() +if(ARM_TARGET_LANG STREQUAL "clang") + # note(ysh329): fix slow compilation for arm cpu, + # and abnormal exit compilation for opencl due to lots of warning + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-inconsistent-missing-override -Wno-return-type") +endif() + if(LITE_WITH_OPENMP) find_package(OpenMP REQUIRED) if(OPENMP_FOUND OR OpenMP_CXX_FOUND) -- GitLab