mirror of
https://github.com/XRPLF/clio.git
synced 2025-12-06 17:27:58 +00:00
feat: Add flags to deps for sanitizer builds (#2205)
Fix: https://github.com/XRPLF/clio/issues/2198 Tested in #2208
This commit is contained in:
@@ -2,14 +2,17 @@
|
||||
|
||||
{% set sanitizer_opt_map = {'asan': 'address', 'tsan': 'thread', 'ubsan': 'undefined'} %}
|
||||
{% set sanitizer = sanitizer_opt_map[sani] %}
|
||||
{% set sanitizer_build_flags = "-fsanitize=" ~ sanitizer ~ " -g -O1 -fno-omit-frame-pointer" %}
|
||||
{% set sanitizer_link_flags = "-fsanitize=" ~ sanitizer %}
|
||||
|
||||
include({{ compiler }})
|
||||
|
||||
[options]
|
||||
boost/*:extra_b2_flags="cxxflags=\"-fsanitize={{ sanitizer }}\" linkflags=\"-fsanitize={{ sanitizer }}\""
|
||||
boost/*:without_stacktrace=True
|
||||
boost/*:extra_b2_flags = "cxxflags=\"{{ sanitizer_build_flags }}\" linkflags=\"{{ sanitizer_link_flags }}\""
|
||||
boost/*:without_stacktrace = True
|
||||
|
||||
[conf]
|
||||
tools.build:cflags+=["-fsanitize={{ sanitizer }}"]
|
||||
tools.build:cxxflags+=["-fsanitize={{ sanitizer }}"]
|
||||
tools.build:exelinkflags+=["-fsanitize={{ sanitizer }}"]
|
||||
tools.build:cflags += ["{{ sanitizer_build_flags }}"]
|
||||
tools.build:cxxflags += ["{{ sanitizer_build_flags }}"]
|
||||
tools.build:exelinkflags += ["{{ sanitizer_link_flags }}"]
|
||||
tools.build:sharedlinkflags += ["{{ sanitizer_link_flags }}"]
|
||||
|
||||
Reference in New Issue
Block a user