6 config
.name
= "SafeStack-" + config
.name_suffix
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(
17 "%clang_nosafestack ",
18 config
.clang
+ config
.target_cflags
+ " -O0 -fno-sanitize=safe-stack ",
21 config
.substitutions
.append(
24 config
.clang
+ config
.target_cflags
+ " -O0 -fsanitize=safe-stack ",
28 if config
.lto_supported
:
29 config
.substitutions
.append(
31 r
"%clang_lto_safestack ",
32 " ".join([config
.clang
] + config
.lto_flags
+ ["-fsanitize=safe-stack "]),
36 if config
.host_os
not in ["Linux", "FreeBSD", "NetBSD", "SunOS"]:
37 config
.unsupported
= True