Hi,
tcmalloc contains a bunch of flags that are defined like
DEFINE_int32(verbose, EnvToInt("PERFTOOLS_VERBOSE", 0), "Verbose description.");
where EnvToFoo is defined as
#define EnvToInt(envname, dflt) \
(!getenv(envname) ? (dflt) : strtol(getenv(envname), NULL, 10))
So ever one of these flags add a static initializer. My guess is that nobody ever uses any of tcmalloc's debug env vars, so I'd like to change EnvToFoo in tcmalloc/chromium to just always evaluate to `dftl`.
If you do use tcmalloc's debugging envvars, shout, then I'd make EnvToFoo use the env conditionally on some define and add a gyp define to set that define – then you can set that define for your things, but prod builds won't get these initializers.
Thanks,
Nico