diff options
| author | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2014-12-24 16:58:50 +0000 |
|---|---|---|
| committer | Evgeniy Stepanov <eugeni.stepanov@gmail.com> | 2014-12-24 16:58:50 +0000 |
| commit | cb2f6d431426240bba285f5202d522e36c2e2e8d (patch) | |
| tree | 64c40a4f45f35879f46d71816e8a075a21329f13 /compiler-rt/lib | |
| parent | ced288f8229fddb2b3de865bbd7a1dded7bbba22 (diff) | |
| download | bcm5719-llvm-cb2f6d431426240bba285f5202d522e36c2e2e8d.tar.gz bcm5719-llvm-cb2f6d431426240bba285f5202d522e36c2e2e8d.zip | |
[asan] Support ASAN_ACTIVATION_OPTIONS.
This is mostly useful for testing, as the only other way of specifying
activation options (Android system property) is system-wide and affects
concurrently running tests.
llvm-svn: 224824
Diffstat (limited to 'compiler-rt/lib')
| -rw-r--r-- | compiler-rt/lib/asan/asan_activation.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler-rt/lib/asan/asan_activation.cc b/compiler-rt/lib/asan/asan_activation.cc index 010cf319bda..0aca1cb4e86 100644 --- a/compiler-rt/lib/asan/asan_activation.cc +++ b/compiler-rt/lib/asan/asan_activation.cc @@ -39,6 +39,12 @@ static struct AsanDeactivatedFlags { // Check if activation flags need to be overriden. // FIXME: Add diagnostic to check that activation flags string doesn't // contain any other flags. + if (const char *env = GetEnv("ASAN_ACTIVATION_OPTIONS")) { + cf.ParseFromString(env); + ParseFlagsFromString(&f, env); + } + + // Override from getprop asan.options. char buf[100]; GetExtraActivationFlags(buf, sizeof(buf)); cf.ParseFromString(buf); |

