summaryrefslogtreecommitdiffstats
path: root/clang-plugin
diff options
context:
space:
mode:
authorAnton Yuzhaninov <citrin+git@citrin.ru>2018-10-30 14:45:51 -0400
committerAnton Yuzhaninov <citrin+git@citrin.ru>2018-10-30 14:45:51 -0400
commit3ec6820a928849a1de07f963ee0fcef18ff82dcc (patch)
tree2327ee16c18bacd270c832d3afdbd9ab9b1eb98f /clang-plugin
parenta796cd7321dd994a660d524ee72d6d117e8f7454 (diff)
downloadrspamd-3ec6820a928849a1de07f963ee0fcef18ff82dcc.tar.gz
rspamd-3ec6820a928849a1de07f963ee0fcef18ff82dcc.zip
Don't use LLVM_CXX_FLAGS/LLVM_C_FLAGS
llvm-config --cxxflags shows CFLAGS used to compile clang. If clang installed from package and package was build using GCC then it will contain GCC specific flags. In case of clang installed as RPM packge -specs= flags also added. There is not point to use them to compile plugin. For now hardcode flags in clang-plugin/CMakeLists.txt Add -O2 - we want plugin to work fast even if we to compiling rspamd code with -O0.
Diffstat (limited to 'clang-plugin')
-rw-r--r--clang-plugin/CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang-plugin/CMakeLists.txt b/clang-plugin/CMakeLists.txt
index 525d3b57a..62a1d68f5 100644
--- a/clang-plugin/CMakeLists.txt
+++ b/clang-plugin/CMakeLists.txt
@@ -54,7 +54,7 @@ IF (ENABLE_CLANG_PLUGIN MATCHES "ON")
ADD_LIBRARY(rspamd-clang SHARED ${CLANGPLUGINSRC})
SET_TARGET_PROPERTIES(rspamd-clang PROPERTIES
- COMPILE_FLAGS "${LLVM_CXX_FLAGS} ${LLVM_CPP_FLAGS} ${LLVM_C_FLAGS}"
+ COMPILE_FLAGS "${LLVM_CPP_FLAGS} -O2 -Wall -Wextra -Wno-unused-parameter -Werror"
INCLUDE_DIRECTORIES ${LIBCLANG_INCLUDE_DIR}
LINKER_LANGUAGE CXX)
TARGET_LINK_LIBRARIES(rspamd-clang ${LIBCLANG_LIBRARIES})