eastig added a comment. In http://reviews.llvm.org/D12689#243295, @rnk wrote:
> I think a better approach would be to use > `__attribute__((init_priority(101)))` on Linux and `#pragma init_seg(lib)` on > Windows to ensure that libc++'s iostream initializer runs earlier. Thank you for advice. I found this discussion of init_priority: Clarification of attribute init_priority https://gcc.gnu.org/ml/gcc-help/2011-05/msg00220.html It looks like it is not reliable method (https://gcc.gnu.org/ml/gcc-help/2011-05/msg00221.html): > Note that although the documentation doesn't seem to mention it, the > init_priority attribute only works correctly when using the GNU linker > or gold. Gcc libc++ does not use it. http://reviews.llvm.org/D12689 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits