[libcxx-commits] [PATCH] D91565: Guard init_priority attribute within libc++

Zbigniew Sarbinowski via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Nov 17 14:10:39 PST 2020


zibi marked 2 inline comments as done.
zibi added inline comments.


================
Comment at: libcxx/include/__config:1444
+#else
+# define _LIBCPP_INIT_PRIORITY_MAX __attribute__((init_priority(101)))
+#endif
----------------
ldionne wrote:
> 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`?
Sure,  not sure if you still want to disable `init_priority` and use `__has_attribute()` guard.  Please let me know before I investigate how to disable it.


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