================ Comment at: lib/asan/asan_rtl.cc:575 @@ +574,3 @@ +#if CAN_SANITIZE_LEAKS + if (flags()->detect_leaks) + __lsan::DoLeakCheck(); ---------------- can't you solve the problem w/o duplicating code? E.g. move the detect_leak flags to common? http://llvm-reviews.chandlerc.com/D1193