diff options
Diffstat (limited to 'test/scudo/lit.cfg')
-rw-r--r-- | test/scudo/lit.cfg | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/test/scudo/lit.cfg b/test/scudo/lit.cfg index adf16f57b..d0a4cb167 100644 --- a/test/scudo/lit.cfg +++ b/test/scudo/lit.cfg @@ -25,15 +25,30 @@ c_flags = ([config.target_cflags] + "-O0", "-UNDEBUG", "-ldl", - "-lrt", "-Wl,--gc-sections"]) +# Android doesn't want -lrt. +if not config.android: + c_flags += ["-lrt"] + def build_invocation(compile_flags): return " " + " ".join([config.clang] + compile_flags) + " " # Add clang substitutions. -config.substitutions.append( ("%clang_scudo ", - build_invocation(c_flags) + whole_archive) ) +config.substitutions.append(("%clang_scudo ", + build_invocation(c_flags) + whole_archive)) + +# Platform-specific default SCUDO_OPTIONS for lit tests. +default_scudo_opts = '' +if config.android: + # Android defaults to abort_on_error=1, which doesn't work for us. + default_scudo_opts = 'abort_on_error=0' + +if default_scudo_opts: + config.environment['SCUDO_OPTIONS'] = default_scudo_opts + default_scudo_opts += ':' +config.substitutions.append(('%env_scudo_opts=', + 'env SCUDO_OPTIONS=' + default_scudo_opts)) # Hardened Allocator tests are currently supported on Linux only. if config.host_os not in ['Linux']: |