Commit 26600085 authored by Ghislain MARY's avatar Ghislain MARY

Add an option to enable sanitizer tools from the Clang toolkit.

parent a7b26b66
......@@ -25,4 +25,5 @@ lcb_git_tag_latest("master")
lcb_git_tag("1.0.2")
lcb_external_source_paths("bcg729")
lcb_groupable(YES)
lcb_sanitizable(YES)
lcb_package_source(YES)
......@@ -25,6 +25,7 @@ lcb_git_tag_latest("master")
lcb_git_tag("master")
lcb_external_source_paths("bctoolbox")
lcb_groupable(YES)
lcb_sanitizable(YES)
lcb_package_source(YES)
lcb_spec_file("bctoolbox.spec")
......
......@@ -25,6 +25,7 @@ lcb_git_tag_latest("master")
lcb_git_tag("master")
lcb_external_source_paths("belcard")
lcb_groupable(YES)
lcb_sanitizable(YES)
lcb_package_source(YES)
lcb_spec_file("belcard.spec")
......@@ -33,3 +34,4 @@ lcb_dependencies("bctoolbox" "belr")
lcb_cmake_options(
"-DENABLE_UNIT_TESTS=${ENABLE_UNIT_TESTS}"
)
......@@ -25,6 +25,7 @@ lcb_git_tag_latest("master")
lcb_git_tag("1.5.3")
lcb_external_source_paths("belle-sip")
lcb_groupable(YES)
lcb_sanitizable(YES)
lcb_package_source(YES)
lcb_spec_file("belle-sip.spec")
lcb_rpmbuild_name("belle-sip")
......
......@@ -25,6 +25,7 @@ lcb_git_tag_latest("master")
lcb_git_tag("master")
lcb_external_source_paths("belr")
lcb_groupable(YES)
lcb_sanitizable(YES)
lcb_package_source(YES)
lcb_spec_file("belr.spec")
......
......@@ -25,6 +25,7 @@ lcb_git_tag_latest("master")
lcb_git_tag("1.0.4")
lcb_external_source_paths("bzrtp")
lcb_groupable(YES)
lcb_sanitizable(YES)
lcb_package_source(YES)
lcb_spec_file("bzrtp.spec")
......
......@@ -25,6 +25,7 @@ lcb_git_tag_latest("master")
lcb_git_tag("cc4e47496600e9b1d3d412ce6e887275c204334b")
lcb_external_source_paths("<LINPHONE_BUILDER_TOP_DIR>")
lcb_groupable(YES)
lcb_sanitizable(YES)
lcb_spec_file("flexisip.spec")
lcb_dependencies("sofiasip")
......
......@@ -25,5 +25,6 @@ lcb_git_tag_latest("master")
lcb_git_tag("master")
lcb_external_source_paths("lime")
lcb_groupable(YES)
lcb_sanitizable(YES)
lcb_package_source(YES)
lcb_dependencies("decaf")
......@@ -25,6 +25,7 @@ lcb_git_tag_latest("master")
lcb_git_tag("3.10.0")
lcb_external_source_paths("linphone")
lcb_groupable(YES)
lcb_sanitizable(YES)
lcb_package_source(YES)
lcb_spec_file("liblinphone.spec")
lcb_rpmbuild_name("liblinphone")
......
......@@ -25,6 +25,7 @@ lcb_git_tag_latest("master")
lcb_git_tag("2.14.0")
lcb_external_source_paths("mediastreamer2")
lcb_groupable(YES)
lcb_sanitizable(YES)
lcb_package_source(YES)
lcb_spec_file("mediastreamer2.spec")
lcb_rpmbuild_name("mediastreamer")
......
......@@ -25,6 +25,7 @@ lcb_git_tag_latest("master")
lcb_git_tag("1.1.2")
lcb_external_source_paths("msamr")
lcb_groupable(YES)
lcb_sanitizable(YES)
lcb_package_source(YES)
lcb_plugin(YES)
......
......@@ -25,6 +25,7 @@ lcb_git_tag_latest("master")
lcb_git_tag("master")
lcb_external_source_paths("mscodec2")
lcb_groupable(YES)
lcb_sanitizable(YES)
lcb_plugin(YES)
lcb_dependencies("ms2" "codec2")
......@@ -25,6 +25,7 @@ lcb_git_tag_latest("master")
lcb_git_tag("1.1.2")
lcb_external_source_paths("msopenh264")
lcb_groupable(YES)
lcb_sanitizable(YES)
lcb_package_source(YES)
lcb_plugin(YES)
......
......@@ -25,6 +25,7 @@ lcb_git_tag_latest("master")
lcb_git_tag("1.0.2")
lcb_external_source_paths("mssilk")
lcb_groupable(YES)
lcb_sanitizable(YES)
lcb_package_source(YES)
lcb_plugin(YES)
......
......@@ -25,6 +25,7 @@ lcb_git_tag_latest("master")
lcb_git_tag("88c0fa6ae7ea35fa25eac5ce4b50898e85443ff0")
lcb_external_source_paths("mswebrtc")
lcb_groupable(YES)
lcb_sanitizable(YES)
lcb_package_source(YES)
lcb_plugin(YES)
lcb_spec_file("mswebrtc.spec")
......
......@@ -25,6 +25,7 @@ lcb_git_tag_latest("master")
lcb_git_tag("0.27.0")
lcb_external_source_paths("oRTP" "ortp")
lcb_groupable(YES)
lcb_sanitizable(YES)
lcb_package_source(YES)
lcb_dependencies("bctoolbox")
......
......@@ -25,6 +25,7 @@ lcb_git_tag_latest("master")
lcb_git_tag("5d8582208f37174ded18280c7c1f8feefb1c4c55")
lcb_external_source_paths("tunnel")
lcb_groupable(YES)
lcb_sanitizable(YES)
lcb_dependencies("bctoolbox")
lcb_cmake_options("-DENABLE_SERVERS=NO")
......
......@@ -434,6 +434,15 @@ macro(linphone_builder_apply_extra_flags PROJNAME)
set(CMAKE_C_FLAGS_${BUILD_TYPE} "${CMAKE_C_FLAGS_${BUILD_TYPE}} ${_no_warnings_flag}")
set(CMAKE_CXX_FLAGS_${BUILD_TYPE} "${CMAKE_CXX_FLAGS_${BUILD_TYPE}} ${_no_warnings_flag}")
endif()
if(ENABLE_SANITIZER AND EP_${PROJNAME}_SANITIZABLE)
set(sanitize_flags "-fsanitize=address")
set(CMAKE_C_FLAGS_${BUILD_TYPE} "${CMAKE_C_FLAGS_${BUILD_TYPE}} ${sanitize_flags}")
set(CMAKE_CXX_FLAGS_${BUILD_TYPE} "${CMAKE_CXX_FLAGS_${BUILD_TYPE}} ${sanitize_flags}")
set(CMAKE_EXE_LINKER_FLAGS_${BUILD_TYPE} "${CMAKE_EXE_LINKER_FLAGS_${BUILD_TYPE}} ${sanitize_flags}")
set(CMAKE_MODULE_LINKER_FLAGS_${BUILD_TYPE} "${CMAKE_MODULE_LINKER_FLAGS_${BUILD_TYPE}} ${sanitize_flags}")
set(CMAKE_SHARED_LINKER_FLAGS_${BUILD_TYPE} "${CMAKE_SHARED_LINKER_FLAGS_${BUILD_TYPE}} ${sanitize_flags}")
unset(sanitize_flags)
endif()
endif()
unset(BUILD_TYPE)
endmacro()
......@@ -1491,6 +1500,15 @@ macro(lcb_rpmbuild_options)
lcb_builder_rpmbuild_options("${LINPHONE_BUILDER_CURRENT_BUILDER}" ${ARGN})
endmacro()
macro(lcb_builder_sanitizable BUILDER BOOL_VALUE)
set(EP_${BUILDER}_SANITIZABLE ${BOOL_VALUE})
endmacro()
macro(lcb_sanitizable BOOL_VALUE)
lcb_check_current_builder()
lcb_builder_sanitizable("${LINPHONE_BUILDER_CURRENT_BUILDER}" ${BOOL_VALUE})
endmacro()
macro(lcb_blacklist_dependencies)
set(_args "${ARGN}")
foreach(_dependency IN LISTS _args)
......
......@@ -24,6 +24,9 @@
lcb_add_option("Theora" "Theora video encoding/decoding support." "${DEFAULT_VALUE_ENABLE_THEORA}")
lcb_add_option("Static only" "Enable compilation of libraries in static mode." "${DEFAULT_VALUE_ENABLE_STATIC_ONLY}")
lcb_add_option("Packaging" "Enable packaging" "${DEFAULT_VALUE_ENABLE_PACKAGING}")
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
lcb_add_option("Sanitizer" "Enable Clang sanitizer" "${DEFAULT_VALUE_ENABLE_SANITIZER}")
endif()
lcb_add_option("Source packaging" "Enable source packaging" "${DEFAULT_VALUE_ENABLE_SOURCE_PACKAGING}")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment