Aidl: Let ASAN know that aidl doesn't want lsan

Temporary workaround. Aidl is not cleaning up itself right now.

This is in code, as otherwise generated makefiles would have to
use ASAN_OPTIONS=... at every invocation.

Bug: 37749857
Test: ASAN_OPTIONS= SANITIZE_HOST=address m
Change-Id: Ife7c97c076c1f182c9699f388edc852f94fc7c12
diff --git a/main_cpp.cpp b/main_cpp.cpp
index 790efdc..e904a92 100644
--- a/main_cpp.cpp
+++ b/main_cpp.cpp
@@ -23,6 +23,11 @@
 
 using android::aidl::CppOptions;
 
+// aidl is leaky. Turn off LeakSanitizer by default. b/37749857
+extern "C" const char *__asan_default_options() {
+    return "detect_leaks=0";
+}
+
 int main(int argc, char** argv) {
   android::base::InitLogging(argv);
   LOG(DEBUG) << "aidl starting";
diff --git a/main_java.cpp b/main_java.cpp
index 7d32b24..d624a13 100644
--- a/main_java.cpp
+++ b/main_java.cpp
@@ -24,6 +24,11 @@
 
 using android::aidl::JavaOptions;
 
+// aidl is leaky. Turn off LeakSanitizer by default. b/37749857
+extern "C" const char *__asan_default_options() {
+    return "detect_leaks=0";
+}
+
 int main(int argc, char** argv) {
   android::base::InitLogging(argv);
   LOG(DEBUG) << "aidl starting";