[PATCH] D31413: [libc++] Use __attribute__((init_priority(101))) to ensure streams get initialized early

2020-09-23 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D31413#2279498 , @aaron.ballman wrote: > In D31413#2279404 , @ldionne wrote: > >> In D31413#2279182 , @aaron.ballman >> wrote: >> >>>

[PATCH] D31413: [libc++] Use __attribute__((init_priority(101))) to ensure streams get initialized early

2020-09-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D31413#2279404 , @ldionne wrote: > In D31413#2279182 , @aaron.ballman > wrote: > >> Yes, and the way I would handle this is to change the `init_priority` value >> checking to

[PATCH] D31413: [libc++] Use __attribute__((init_priority(101))) to ensure streams get initialized early

2020-09-17 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a comment. In D31413#2279182 , @aaron.ballman wrote: > Yes, and the way I would handle this is to change the `init_priority` value > checking to allow values <= 100 if the attribute location is within a system > header. This would allow

[PATCH] D31413: [libc++] Use __attribute__((init_priority(101))) to ensure streams get initialized early

2020-09-17 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D31413#2277985 , @ldionne wrote: > In D31413#2277630 , @smeenai wrote: > >> What was the conclusion for the comments about the priority level (100 vs. >> 101)? > > My

[PATCH] D31413: [libc++] Use __attribute__((init_priority(101))) to ensure streams get initialized early

2020-09-17 Thread Hans Wennborg via Phabricator via cfe-commits
hans added a comment. In D31413#2277085 , @sbc100 wrote: > Might even be worth backporting such as simple but useful fix to the 11 > release? I think it's too late in the process for that. Might be a good candidate for 11.0.1 though. Repository: rG

[PATCH] D31413: [libc++] Use __attribute__((init_priority(101))) to ensure streams get initialized early

2020-09-16 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a comment. In D31413#2277630 , @smeenai wrote: > What was the conclusion for the comments about the priority level (100 vs. > 101)? My understanding is that values below `101` are literally not allowed:

[PATCH] D31413: [libc++] Use __attribute__((init_priority(101))) to ensure streams get initialized early

2020-09-16 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. What was the conclusion for the comments about the priority level (100 vs. 101)? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D31413/new/ https://reviews.llvm.org/D31413 ___

[PATCH] D31413: [libc++] Use __attribute__((init_priority(101))) to ensure streams get initialized early

2020-09-16 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a subscriber: hans. ldionne added a comment. @hans Is there still time to cherry-pick this to the 11 release? In D31413#2277198 , @eastig wrote: > I don't mind. > Just to check, in PR28954 it is mentioned the solution based on >

[PATCH] D31413: [libc++] Use __attribute__((init_priority(101))) to ensure streams get initialized early

2020-09-16 Thread Evgeny Astigeevich via Phabricator via cfe-commits
eastig added a comment. In D31413#2277133 , @ldionne wrote: > In D31413#2277118 , @eastig wrote: > >> In D31413#2277070 , @ldionne wrote: >> >>> Added a test. I can't

[PATCH] D31413: [libc++] Use __attribute__((init_priority(101))) to ensure streams get initialized early

2020-09-16 Thread Louis Dionne via Phabricator via cfe-commits
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG39faf428164a: [libc++] Ensure streams are initialized early

[PATCH] D31413: [libc++] Use __attribute__((init_priority(101))) to ensure streams get initialized early

2020-09-16 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added inline comments. Comment at: libcxx/test/std/input.output/iostream.objects/init.pass.cpp:15 +// +// This test works by checking that 'std::{cin/cout,cerr}' is the same in a +// static object constructor and in the main function. It dumps the memory of

[PATCH] D31413: [libc++] Use __attribute__((init_priority(101))) to ensure streams get initialized early

2020-09-16 Thread Louis Dionne via Phabricator via cfe-commits
ldionne updated this revision to Diff 292261. ldionne added a comment. Add tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D31413/new/ https://reviews.llvm.org/D31413 Files: libcxx/src/iostream.cpp

[PATCH] D31413: [libc++] Use __attribute__((init_priority(101))) to ensure streams get initialized early

2020-09-16 Thread Louis Dionne via Phabricator via cfe-commits
ldionne added a comment. In D31413#2277118 , @eastig wrote: > In D31413#2277070 , @ldionne wrote: > >> Added a test. I can't reproduce the issue, so I don't know whether the test >> is useful or not. Please help

[PATCH] D31413: [libc++] Use __attribute__((init_priority(101))) to ensure streams get initialized early

2020-09-16 Thread Evgeny Astigeevich via Phabricator via cfe-commits
eastig added a comment. In D31413#2277070 , @ldionne wrote: > Added a test. I can't reproduce the issue, so I don't know whether the test > is useful or not. Please help with that! There are tests in https://reviews.llvm.org/D12689 . Repository: rG

[PATCH] D31413: [libc++] Use __attribute__((init_priority(101))) to ensure streams get initialized early

2020-09-16 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. Might even be worth backporting such as simple but useful fix to the 11 release? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D31413/new/ https://reviews.llvm.org/D31413 ___

[PATCH] D31413: [libc++] Use __attribute__((init_priority(101))) to ensure streams get initialized early

2020-09-16 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 accepted this revision. sbc100 added a comment. I'd love to see this land so we can drop our downstream patch in emscripten and also fix the outstanding wasi-sdk issue. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D31413/new/

[PATCH] D31413: [libc++] Use __attribute__((init_priority(101))) to ensure streams get initialized early

2020-09-16 Thread Louis Dionne via Phabricator via cfe-commits
ldionne updated this revision to Diff 292254. ldionne added a comment. Herald added a project: libc++. Herald added a subscriber: libcxx-commits. Herald added a reviewer: libc++. Added a test. I can't reproduce the issue, so I don't know whether the test is useful or not. Please help with that!

[PATCH] D31413: [libc++] Use __attribute__((init_priority(101))) to ensure streams get initialized early

2020-09-16 Thread Louis Dionne via Phabricator via cfe-commits
ldionne commandeered this revision. ldionne added a reviewer: EricWF. ldionne added a comment. Herald added subscribers: dexonsmith, jkorous. I did some work on trying to reproduce this a while ago but never got to reproducing it on macOS. CHANGES SINCE LAST ACTION

[PATCH] D31413: [libc++] Use __attribute__((init_priority(101))) to ensure streams get initialized early

2020-09-15 Thread Sam Clegg via Phabricator via cfe-commits
sbc100 added a comment. This came up again in wasi-sdk: https://github.com/WebAssembly/wasi-sdk/issues/153 CHANGES SINCE LAST ACTION https://reviews.llvm.org/D31413/new/ https://reviews.llvm.org/D31413 ___ cfe-commits mailing list

[PATCH] D31413: [libc++] Use __attribute__((init_priority(101))) to ensure streams get initialized early

2017-04-11 Thread Hal Finkel via Phabricator via cfe-commits
hfinkel added a comment. In https://reviews.llvm.org/D31413#712013, @aaron.ballman wrote: > I'm not certain of a good way to test it, but I have a question about the > value you picked for `init_priority`. My understanding of the values starting > from 101 is that 1-100 are reserved for

[PATCH] D31413: [libc++] Use __attribute__((init_priority(101))) to ensure streams get initialized early

2017-03-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I'm not certain of a good way to test it, but I have a question about the value you picked for `init_priority`. My understanding of the values starting from 101 is that 1-100 are reserved for implementation use. Is that understanding correct? If so, you may want

[PATCH] D31413: [libc++] Use __attribute__((init_priority(101))) to ensure streams get initialized early

2017-03-27 Thread Eric Fiselier via Phabricator via cfe-commits
EricWF created this revision. This patch fixes http://llvm.org/PR28954 using the `init_priority` attribute. All supported compilers accept this attribute, including clang-cl. I'm only putting this up for review because IDK how to write a test for it. Can anybody suggest a way to test this?