From: sub.mohanty@samsung.com Date: Sat, 15 Sep 2018 14:03:04 +0000 (+0900) Subject: lottie/build: add sanitizer build to lottie-player library. X-Git-Tag: submit/tizen/20180918.061016~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F90%2F189290%2F1;p=platform%2Fcore%2Fuifw%2Flottie-player.git lottie/build: add sanitizer build to lottie-player library. Change-Id: I51d7d4b21bae19f4b6174ccb8f48ceefcc01f434 --- diff --git a/meson.build b/meson.build index 9552d9b..a3315b5 100644 --- a/meson.build +++ b/meson.build @@ -8,6 +8,22 @@ add_global_arguments('-DDEMO_DIR="@0@/example/resource/"'.format(meson.current_s compiler_flags = ['-Wall', '-O2', '-std=c++14', '-fvisibility=hidden'] +if get_option('asan') == true + compiler_flags += ['-fsanitize=address'] + add_global_link_arguments('-fsanitize=address', language: 'cpp') +endif + +if get_option('msan') == true + compiler_flags += ['-fsanitize=memory'] + add_global_link_arguments('-fsanitize=memory', language: 'cpp') +endif + +if get_option('tsan') == true + compiler_flags += ['-fsanitize=thread'] + add_global_link_arguments('-fsanitize=thread', language: 'cpp') +endif + + if (build_machine.system() == 'linux') compiler_flags += ['-pthread'] add_global_link_arguments('-pthread', language: 'cpp') diff --git a/meson_options.txt b/meson_options.txt index d8e5890..c2c548f 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -12,3 +12,21 @@ option('text', type: 'boolean', value: false, description: 'enable text module') + + +option('asan', + type: 'boolean', + value: false, + description: 'enable adress sanitizer') + + +option('msan', + type: 'boolean', + value: false, + description: 'enable memory sanitizer') + + +option('tsan', + type: 'boolean', + value: false, + description: 'enable thread sanitizer')