mstorsjo wrote: > Whatever we decide to do on the LLVM side, this seems fine for the clang side.
Yes, this bit should be fine in any case. > It looks like clang uses the value of UseInitArray for some ObjC stuff, in > addition to passing it to the backend, so we need the right value in clang in > any case. Indeed, having the correct picture is good, if there's logic that depends on it. For the ObjC case, the code actually looks like this: ```cpp if (CGM.getTriple().isOSBinFormatCOFF()) InitVar->setSection(".CRT$XCLz"); else { if (CGM.getCodeGenOpts().UseInitArray) InitVar->setSection(".init_array"); else InitVar->setSection(".ctors"); } ``` So in that sense, it doesn't really matter here. (The `.CRT$...` sections do work on mingw too, even if `.ctors` normally is used.) https://github.com/llvm/llvm-project/pull/68571 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits