Changeset View
Changeset View
Standalone View
Standalone View
test/scudo/lit.cfg
Show All 10 Lines | |||||
# Path to the shared library | # Path to the shared library | ||||
shared_libscudo = os.path.join(config.compiler_rt_libdir, "libclang_rt.scudo-%s.so" % config.target_arch) | shared_libscudo = os.path.join(config.compiler_rt_libdir, "libclang_rt.scudo-%s.so" % config.target_arch) | ||||
# Test suffixes. | # Test suffixes. | ||||
config.suffixes = ['.c', '.cc', '.cpp'] | config.suffixes = ['.c', '.cc', '.cpp'] | ||||
# C & CXX flags. | # C & CXX flags. | ||||
c_flags = ([config.target_cflags] + | c_flags = ([config.target_cflags] + | ||||
["-pthread", | ["-O0", | ||||
"-UNDEBUG"]) | |||||
if config.host_os != 'Windows': | |||||
c_flags += ["-pthread", | |||||
"-fPIE", | "-fPIE", | ||||
"-pie", | "-pie", | ||||
"-O0", | |||||
"-UNDEBUG", | |||||
"-ldl", | "-ldl", | ||||
"-Wl,--gc-sections"]) | "-Wl,--gc-sections"] | ||||
# Android doesn't want -lrt. | # Android doesn't want -lrt. | ||||
if not config.android: | if not config.android: | ||||
c_flags += ["-lrt"] | c_flags += ["-lrt"] | ||||
cxx_flags = (c_flags + config.cxx_mode_flags + ["-std=c++11"]) | cxx_flags = (c_flags + config.cxx_mode_flags) | ||||
if config.host_os != 'Windows': | |||||
cxx_flags += ["-std=c++11"] | |||||
scudo_flags = ["-fsanitize=scudo"] | scudo_flags = ["-fsanitize=scudo"] | ||||
def build_invocation(compile_flags): | def build_invocation(compile_flags): | ||||
return " " + " ".join([config.clang] + compile_flags) + " " | return " " + " ".join([config.clang] + compile_flags) + " " | ||||
# Add clang substitutions. | # Add clang substitutions. | ||||
config.substitutions.append(("%clang ", build_invocation(c_flags))) | config.substitutions.append(("%clang ", build_invocation(c_flags))) | ||||
Show All 9 Lines | |||||
if default_scudo_opts: | if default_scudo_opts: | ||||
config.environment['SCUDO_OPTIONS'] = default_scudo_opts | config.environment['SCUDO_OPTIONS'] = default_scudo_opts | ||||
default_scudo_opts += ':' | default_scudo_opts += ':' | ||||
config.substitutions.append(('%env_scudo_opts=', | config.substitutions.append(('%env_scudo_opts=', | ||||
'env SCUDO_OPTIONS=' + default_scudo_opts)) | 'env SCUDO_OPTIONS=' + default_scudo_opts)) | ||||
# Hardened Allocator tests are currently supported on Linux only. | # Hardened Allocator tests are currently supported on Linux only. | ||||
if config.host_os not in ['Linux']: | if config.host_os not in ['Linux', 'Windows']: | ||||
config.unsupported = True | config.unsupported = True |