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

Side by Side 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.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | meson_options.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 project('adblockpluscore', 'cpp', license: ['GPL3'], meson_version: '>0.40.0') 1 project('adblockpluscore', 'cpp', license: ['GPL3'], meson_version: '>0.40.0')
2 2
3 native = get_option('native') 3 native = get_option('native')
4 if native 4 if native
5 target_type='native' 5 target_type='native'
6 else 6 else
7 target_type='js' 7 target_type='js'
8 endif 8 endif
9 asan = get_option('asan')
9 10
10 if target_type == 'js' 11 if target_type == 'js'
11 # locate emscripten-config 12 # locate emscripten-config
12 python = import('python3').find_python() 13 python = import('python3').find_python()
13 emscripten_config = get_option('emscripten-config') 14 emscripten_config = get_option('emscripten-config')
14 command = run_command(python, '-c', 'import os.path, sys;print(os.path.expandu ser(sys.argv[1]))', emscripten_config) 15 command = run_command(python, '-c', 'import os.path, sys;print(os.path.expandu ser(sys.argv[1]))', emscripten_config)
15 if command.returncode() != 0 16 if command.returncode() != 0
16 error(command.stderr().strip()) 17 error(command.stderr().strip())
17 endif 18 endif
18 emscripten_config = command.stdout().strip() 19 emscripten_config = command.stdout().strip()
(...skipping 30 matching lines...) Expand all
49 if cpp_compiler_id != 'msvc' 50 if cpp_compiler_id != 'msvc'
50 ADDITIONAL_PARAMS += [ '-O3', '-std=c++14', '-Wall', '-fno-rtti' ] 51 ADDITIONAL_PARAMS += [ '-O3', '-std=c++14', '-Wall', '-fno-rtti' ]
51 endif 52 endif
52 53
53 if target_type == 'js' 54 if target_type == 'js'
54 # CXXFLAGS specific to emcc 55 # CXXFLAGS specific to emcc
55 ADDITIONAL_PARAMS += [ '-m32', '--memory-init-file', '0', 56 ADDITIONAL_PARAMS += [ '-m32', '--memory-init-file', '0',
56 '--emit-symbol-map' ] 57 '--emit-symbol-map' ]
57 else 58 else
58 if cpp_compiler_id != 'msvc' 59 if cpp_compiler_id != 'msvc'
59 ADDITIONAL_PARAMS += [ '-fsanitize=address' ] 60 if asan
61 ADDITIONAL_PARAMS += [ '-fsanitize=address' ]
62 endif
60 endif 63 endif
61 endif 64 endif
62 # additional params just for core 65 # additional params just for core
63 CORE_PARAMS = [] 66 CORE_PARAMS = []
64 if cpp_compiler_id != 'msvc' 67 if cpp_compiler_id != 'msvc'
65 CORE_PARAMS += [ '-fno-exceptions' ] 68 CORE_PARAMS += [ '-fno-exceptions' ]
66 endif 69 endif
67 70
68 DEFINES = [] 71 DEFINES = []
69 GENERATION_PARAMS = [ 72 GENERATION_PARAMS = [
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 generation_args += param[0] + '=' + '@0@'.format(param[1]) 132 generation_args += param[0] + '=' + '@0@'.format(param[1])
130 endforeach 133 endforeach
131 134
132 optional_args = [] 135 optional_args = []
133 buildtype = get_option('buildtype') 136 buildtype = get_option('buildtype')
134 if buildtype.startswith('debug') 137 if buildtype.startswith('debug')
135 if cpp_compiler_id != 'msvc' 138 if cpp_compiler_id != 'msvc'
136 optional_args += '-DDEBUG' 139 optional_args += '-DDEBUG'
137 optional_args += '-g3' 140 optional_args += '-g3'
138 if target_type == 'native' 141 if target_type == 'native'
139 ADDITIONAL_PARAMS += [ '-fsanitize=address' ] 142 if asan
140 LINK_PARAMS += [ '-fsanitize=address' ] 143 ADDITIONAL_PARAMS += [ '-fsanitize=address' ]
144 LINK_PARAMS += [ '-fsanitize=address' ]
145 endif
141 endif 146 endif
142 endif 147 endif
143 endif 148 endif
144 tracing = get_option('tracing') 149 tracing = get_option('tracing')
145 if tracing 150 if tracing
146 optional_args += '--tracing' 151 optional_args += '--tracing'
147 endif 152 endif
148 153
149 154
150 if target_type == 'js' 155 if target_type == 'js'
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 ], 243 ],
239 cpp_args: GTEST_PARAMS) 244 cpp_args: GTEST_PARAMS)
240 abptest = executable('abptest', test_sources, 245 abptest = executable('abptest', test_sources,
241 cpp_args: compiler_args + ['-DINSIDE_TESTS'], 246 cpp_args: compiler_args + ['-DINSIDE_TESTS'],
242 include_directories: include_directories(join_paths(GTEST _DIR, 'include')), 247 include_directories: include_directories(join_paths(GTEST _DIR, 'include')),
243 link_args: LINK_PARAMS, 248 link_args: LINK_PARAMS,
244 link_with: [ adblockpluscore, gtest ]) 249 link_with: [ adblockpluscore, gtest ])
245 test('abptest', abptest) 250 test('abptest', abptest)
246 endif 251 endif
247 252
OLDNEW
« 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