Merge pull request #3222 from mapnik/sanitize_errors
Add configure flags for Sanitize errors
This commit is contained in:
commit
fd6e7704a1
2 changed files with 7 additions and 2 deletions
|
@ -294,6 +294,7 @@ opts.AddVariables(
|
|||
# Note: setting DEBUG=True will override any custom OPTIMIZATION level
|
||||
BoolVariable('DEBUG', 'Compile a debug version of Mapnik', 'False'),
|
||||
BoolVariable('DEBUG_UNDEFINED', 'Compile a version of Mapnik using clang/llvm undefined behavior asserts', 'False'),
|
||||
BoolVariable('DEBUG_SANITIZE', 'Compile a version of Mapnik using clang/llvm address sanitation', 'False'),
|
||||
ListVariable('INPUT_PLUGINS','Input drivers to include',DEFAULT_PLUGINS,PLUGINS.keys()),
|
||||
('WARNING_CXXFLAGS', 'Compiler flags you can set to reduce warning levels which are placed after -Wall.', ''),
|
||||
|
||||
|
@ -1799,6 +1800,11 @@ if not preconfigured:
|
|||
if env['DEBUG_UNDEFINED']:
|
||||
env.Append(CXXFLAGS = '-fsanitize=undefined-trap -fsanitize-undefined-trap-on-error -ftrapv -fwrapv')
|
||||
|
||||
if env['DEBUG_SANITIZE']:
|
||||
env.Append(CXXFLAGS = ['-fsanitize=address'])
|
||||
env.Append(LINKFLAGS = ['-fsanitize=address'])
|
||||
|
||||
|
||||
# if requested, sort LIBPATH and CPPPATH one last time before saving...
|
||||
if env['PRIORITIZE_LINKING']:
|
||||
conf.prioritize_paths(silent=True)
|
||||
|
|
|
@ -60,8 +60,7 @@ if env['PLUGIN_LINKING'] == 'shared':
|
|||
SHLIBPREFIX='',
|
||||
SHLIBSUFFIX='.input',
|
||||
source=plugin_sources,
|
||||
LIBS=libraries,
|
||||
LINKFLAGS=env['CUSTOM_LDFLAGS'])
|
||||
LIBS=libraries)
|
||||
|
||||
# if the plugin links to libmapnik ensure it is built first
|
||||
Depends(TARGET, env.subst('../../../src/%s' % env['MAPNIK_LIB_NAME']))
|
||||
|
|
Loading…
Add table
Reference in a new issue