6 config
.name
= "SafeStack"
9 config
.test_source_root
= os
.path
.dirname(__file__
)
12 config
.suffixes
= [".c", ".cpp", ".m", ".mm", ".ll", ".test"]
14 # Add clang substitutions.
15 config
.substitutions
.append(
16 ("%clang_nosafestack ", config
.clang
+ " -O0 -fno-sanitize=safe-stack ")
18 config
.substitutions
.append(
19 ("%clang_safestack ", config
.clang
+ " -O0 -fsanitize=safe-stack ")
22 if config
.lto_supported
:
23 config
.substitutions
.append(
25 r
"%clang_lto_safestack ",
26 " ".join([config
.clang
] + config
.lto_flags
+ ["-fsanitize=safe-stack "]),
30 if config
.host_os
not in ["Linux", "FreeBSD", "NetBSD"]:
31 config
.unsupported
= True