Our runtime for MCU X86 target supports .init_array section for globals that should be dynamically initialized.
But default Clang generates .ctors section and even if it has option -fuse-init-array, the option has no effect if set explicitly in a command-line.
The problem is in lack of -fuse-array-init option initialization in CodeGen
void
X86LinuxNaClTargetObjectFile::Initialize(MCContext &Ctx,
const TargetMachine &TM) { TargetLoweringObjectFileELF::Initialize(Ctx, TM); InitializeELF(TM.Options.UseInitArray);
}