1# -*- Python -*- 2 3import os 4 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( ("%clang_noscs ", config.clang + ' -O0 -fno-sanitize=shadow-call-stack ' + config.target_cflags + ' ') ) 16 17scs_arch_cflags = config.target_cflags 18if config.target_arch == 'aarch64': 19 scs_arch_cflags += ' -ffixed-x18 ' 20config.substitutions.append( ("%clang_scs ", config.clang + ' -O0 -fsanitize=shadow-call-stack ' + scs_arch_cflags + ' ') ) 21 22if config.host_os not in ['Linux'] or config.target_arch not in ['aarch64']: 23 config.unsupported = True 24