Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: meson.build

Issue 29693599: Noissue - Allow disabling address sanitizer (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Created Feb. 9, 2018, 6:18 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | meson_options.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: meson.build
===================================================================
--- a/meson.build
+++ b/meson.build
@@ -1,16 +1,17 @@
project('adblockpluscore', 'cpp', license: ['GPL3'], meson_version: '>0.40.0')
native = get_option('native')
if native
target_type='native'
else
target_type='js'
endif
+asan = get_option('asan')
if target_type == 'js'
# locate emscripten-config
python = import('python3').find_python()
emscripten_config = get_option('emscripten-config')
command = run_command(python, '-c', 'import os.path, sys;print(os.path.expanduser(sys.argv[1]))', emscripten_config)
if command.returncode() != 0
error(command.stderr().strip())
@@ -51,17 +52,19 @@
endif
if target_type == 'js'
# CXXFLAGS specific to emcc
ADDITIONAL_PARAMS += [ '-m32', '--memory-init-file', '0',
'--emit-symbol-map' ]
else
if cpp_compiler_id != 'msvc'
- ADDITIONAL_PARAMS += [ '-fsanitize=address' ]
+ if asan
+ ADDITIONAL_PARAMS += [ '-fsanitize=address' ]
+ endif
endif
endif
# additional params just for core
CORE_PARAMS = []
if cpp_compiler_id != 'msvc'
CORE_PARAMS += [ '-fno-exceptions' ]
endif
@@ -131,18 +134,20 @@
optional_args = []
buildtype = get_option('buildtype')
if buildtype.startswith('debug')
if cpp_compiler_id != 'msvc'
optional_args += '-DDEBUG'
optional_args += '-g3'
if target_type == 'native'
- ADDITIONAL_PARAMS += [ '-fsanitize=address' ]
- LINK_PARAMS += [ '-fsanitize=address' ]
+ if asan
+ ADDITIONAL_PARAMS += [ '-fsanitize=address' ]
+ LINK_PARAMS += [ '-fsanitize=address' ]
+ endif
endif
endif
endif
tracing = get_option('tracing')
if tracing
optional_args += '--tracing'
endif
« no previous file with comments | « no previous file | meson_options.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld