summaryrefslogtreecommitdiff
path: root/lib/sanitizer_common/sanitizer_flags.inc
diff options
context:
space:
mode:
authorEvgeniy Stepanov <eugeni.stepanov@gmail.com>2015-07-23 22:05:20 +0000
committerEvgeniy Stepanov <eugeni.stepanov@gmail.com>2015-07-23 22:05:20 +0000
commit0fbfc5fa0eb0aa0088c200e73e1003926169d162 (patch)
treed7709cfb9d32f92aa8faf63ed3fc4565414ac2c4 /lib/sanitizer_common/sanitizer_flags.inc
parent1a7d91a09cf8756f836ef9624e6f82ce35a91c2a (diff)
[sanitizer] Implement logging to syslog.
Previously, Android target had a logic of duplicating all sanitizer output to logcat. This change extends it to all posix platforms via the use of syslog, controlled by log_to_syslog flag. Enabled by default on Android, off everywhere else. A bit of cmake magic is required to allow Printf() to call a libc function. I'm adding a stub implementation to support no-libc builds like dfsan and safestack. This is a second attempt. I believe I've fixed all the issues that prompted the revert: Mac build, and all kinds of non-CMake builds (there are 3 of those). git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@243051 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/sanitizer_common/sanitizer_flags.inc')
-rw-r--r--lib/sanitizer_common/sanitizer_flags.inc4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/sanitizer_common/sanitizer_flags.inc b/lib/sanitizer_common/sanitizer_flags.inc
index bbb39c73e..79ea2fb8d 100644
--- a/lib/sanitizer_common/sanitizer_flags.inc
+++ b/lib/sanitizer_common/sanitizer_flags.inc
@@ -55,6 +55,10 @@ COMMON_FLAG(
"Mention name of executable when reporting error and "
"append executable name to logs (as in \"log_path.exe_name.pid\").")
COMMON_FLAG(
+ bool, log_to_syslog, SANITIZER_ANDROID,
+ "Write all sanitizer output to syslog in addition to other means of "
+ "logging.")
+COMMON_FLAG(
int, verbosity, 0,
"Verbosity level (0 - silent, 1 - a bit of output, 2+ - more output).")
COMMON_FLAG(bool, detect_leaks, true, "Enable memory leak detection.")