[libFuzzer] experimental performance optimization -lazy_counters, off by default. Posix-only for now, tested on Linux

llvm-svn: 352700
diff --git a/compiler-rt/lib/fuzzer/FuzzerDriver.cpp b/compiler-rt/lib/fuzzer/FuzzerDriver.cpp
index 6528d4d..acebd3a 100644
--- a/compiler-rt/lib/fuzzer/FuzzerDriver.cpp
+++ b/compiler-rt/lib/fuzzer/FuzzerDriver.cpp
@@ -658,7 +658,10 @@
   Options.HandleXfsz = Flags.handle_xfsz;
   Options.HandleUsr1 = Flags.handle_usr1;
   Options.HandleUsr2 = Flags.handle_usr2;
+  Options.LazyCounters = Flags.lazy_counters;
   SetSignalHandler(Options);
+  if (Options.LazyCounters)
+    TPC.ProtectLazyCounters();
 
   std::atexit(Fuzzer::StaticExitCallback);