Some background on the original decision to ban static initializers:
http://neugierig.org/software/chromium/notes/2011/08/static-initializers.html
Common fixes include:
For Linux:
tools/linux/dump-static-initializers.py out/Release/chrome
For Android (from easiest to hardest):
# Build with: is_official_build=true is_chrome_branded=true # This will dump the list of SI's only when they don't match the expected # number in static_initializers.gni (this is what the bots use). ninja chrome/android:monochrome_static_initializers # or: tools/binary_size/diagnose_bloat.py HEAD # See README.md for flags. # or: tools/linux/dump-static-initializers.py --toolchain-prefix third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/arm-linux-androideabi- out/Release/libmonochrome.so
diagnose_bloat.py
, refer to its README.md