[clang] [clang] [MinGW] Explicitly always pass the -fno-use-init-array (PR #68571)

Martin Storsjö via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 9 13:22:35 PDT 2023


mstorsjo wrote:

> We could go with a clang fix, but also make the backend report_fatal_error if you try to use llvm.ctors with UseInitArray on mingw. That keeps everything consistent while also making sure non-clang frontends don't miscompile.

Hmm, interesting proposition... But wouldn't that essentially break every single invocation of `llc` with a mingw triple, unless they also explicitly pass the `-use-ctors` option? And for any other language frontend, I also feel that it would, somewhat abruptly, break every single current user of LLVM for mingw targets, unless they update their calling code to explicitly set `UseInitArray` to false for this target?

https://github.com/llvm/llvm-project/pull/68571


More information about the cfe-commits mailing list