brintos

brintos / llvm-project-archived public Read only

0
0
Text · 836 B · 5b95deb Raw
37 lines · python
1# -*- Python -*-2 3import os4 5# Setup config name.6config.name = "ShadowCallStack"7 8# Setup source root.9config.test_source_root = os.path.dirname(__file__)10 11# Test suffixes.12config.suffixes = [".c", ".cpp", ".m", ".mm", ".ll", ".test"]13 14# Add clang substitutions.15config.substitutions.append(16    (17        "%clang_noscs ",18        config.clang19        + " -O0 -fno-sanitize=shadow-call-stack "20        + config.target_cflags21        + " ",22    )23)24 25scs_arch_cflags = config.target_cflags26if config.target_arch == "aarch64":27    scs_arch_cflags += " -ffixed-x18 "28config.substitutions.append(29    (30        "%clang_scs ",31        config.clang + " -O0 -fsanitize=shadow-call-stack " + scs_arch_cflags + " ",32    )33)34 35if config.target_os not in ["Linux"] or config.target_arch not in ["aarch64", "riscv64"]:36    config.unsupported = True37