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

Aaron Ballman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 17 08:38:02 PDT 2020


aaron.ballman added a comment.

In D31413#2279404 <https://reviews.llvm.org/D31413#2279404>, @ldionne wrote:

> In D31413#2279182 <https://reviews.llvm.org/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 libc++ to use the reserved priority but would still give errors when attempted from user code.
>
> Ok, that makes sense. If Clang implements that change, I can go back and change it in libc++. I unfortunately don't have bandwidth to go and do that, since this isn't affecting a platform I directly work on. So if anyone's willing to go and change Clang to make that work, ping me here and I'll fix libc++.

I can make the change, but it may be a few weeks before I get to it. If someone gets to it sooner, I'd be happy to review the patch for them.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D31413/new/

https://reviews.llvm.org/D31413



More information about the cfe-commits mailing list