[libcxx-commits] [PATCH] D91565: Guard init_priority attribute within libc++
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Nov 17 13:41:36 PST 2020
ldionne added inline comments.
================
Comment at: libcxx/include/__config:1444
+#else
+# define _LIBCPP_INIT_PRIORITY_MAX __attribute__((init_priority(101)))
+#endif
----------------
zibi wrote:
> ldionne wrote:
> > ldionne wrote:
> > > You should use `__has_attribute(init_priority)`.
> > Oh, and I would just define that in `iostream.cpp` if we don't use it anywhere else, to avoid adding complexity to `__config` (which is already a monster).
> > Oh, and I would just define that in `iostream.cpp` if we don't use it anywhere else, to avoid adding complexity to `__config` (which is already a monster).
>
> Sure , this will require additional changes since that attribute is enabled by default and will have to be disabled at least for z/OS.
> The `init_priority` is also used in `experimental/memory_resource.cpp`. Do we want to make changes there as well? I assume the main library and experimental don't share any common files so those guards will have to reside in 2 different places.
Interesting. In that case, I think it's fine to leave it in `__config`, however can you please also de-duplicate the usage in `memory_resource.cpp`?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91565/new/
https://reviews.llvm.org/D91565
More information about the libcxx-commits
mailing list