Add simple runtime tests for shadowcallstack
Summary:
ShadowCallStack does not yet have a runtime provided by compiler-rt, but
this change includes simple tests that make use of a very minimal
runtime in test/shadowcallstack/minimal_runtime.h
Reviewers: pcc, kcc, delcypher, eugenis, filcab
Reviewed By: pcc
Subscribers: kubamracek, mgorny, delcypher, llvm-commits, #sanitizers, kcc
Differential Revision: https://reviews.llvm.org/D44803
llvm-svn: 329210
2018-04-05 01:53:33 +08:00
|
|
|
# -*- Python -*-
|
|
|
|
|
|
|
|
import os
|
|
|
|
|
|
|
|
# Setup config name.
|
|
|
|
config.name = 'ShadowCallStack'
|
|
|
|
|
|
|
|
# Setup source root.
|
|
|
|
config.test_source_root = os.path.dirname(__file__)
|
|
|
|
|
|
|
|
# Test suffixes.
|
2019-08-06 03:25:35 +08:00
|
|
|
config.suffixes = ['.c', '.cpp', '.m', '.mm', '.ll', '.test']
|
Add simple runtime tests for shadowcallstack
Summary:
ShadowCallStack does not yet have a runtime provided by compiler-rt, but
this change includes simple tests that make use of a very minimal
runtime in test/shadowcallstack/minimal_runtime.h
Reviewers: pcc, kcc, delcypher, eugenis, filcab
Reviewed By: pcc
Subscribers: kubamracek, mgorny, delcypher, llvm-commits, #sanitizers, kcc
Differential Revision: https://reviews.llvm.org/D44803
llvm-svn: 329210
2018-04-05 01:53:33 +08:00
|
|
|
|
|
|
|
# Add clang substitutions.
|
2018-04-10 04:18:10 +08:00
|
|
|
config.substitutions.append( ("%clang_noscs ", config.clang + ' -O0 -fno-sanitize=shadow-call-stack ' + config.target_cflags + ' ') )
|
Add simple runtime tests for shadowcallstack
Summary:
ShadowCallStack does not yet have a runtime provided by compiler-rt, but
this change includes simple tests that make use of a very minimal
runtime in test/shadowcallstack/minimal_runtime.h
Reviewers: pcc, kcc, delcypher, eugenis, filcab
Reviewed By: pcc
Subscribers: kubamracek, mgorny, delcypher, llvm-commits, #sanitizers, kcc
Differential Revision: https://reviews.llvm.org/D44803
llvm-svn: 329210
2018-04-05 01:53:33 +08:00
|
|
|
|
2018-04-10 04:18:10 +08:00
|
|
|
scs_arch_cflags = config.target_cflags
|
|
|
|
if config.target_arch == 'aarch64':
|
|
|
|
scs_arch_cflags += ' -ffixed-x18 '
|
|
|
|
config.substitutions.append( ("%clang_scs ", config.clang + ' -O0 -fsanitize=shadow-call-stack ' + scs_arch_cflags + ' ') )
|
|
|
|
|
2019-03-08 02:56:36 +08:00
|
|
|
if config.host_os not in ['Linux'] or config.target_arch not in ['aarch64']:
|
Add simple runtime tests for shadowcallstack
Summary:
ShadowCallStack does not yet have a runtime provided by compiler-rt, but
this change includes simple tests that make use of a very minimal
runtime in test/shadowcallstack/minimal_runtime.h
Reviewers: pcc, kcc, delcypher, eugenis, filcab
Reviewed By: pcc
Subscribers: kubamracek, mgorny, delcypher, llvm-commits, #sanitizers, kcc
Differential Revision: https://reviews.llvm.org/D44803
llvm-svn: 329210
2018-04-05 01:53:33 +08:00
|
|
|
config.unsupported = True
|