[libcxx-commits] [PATCH] D149635: [libunwind] include alloca.h in config.h

Martin Storsjö via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue May 2 03:56:52 PDT 2023


mstorsjo added a comment.

In D149635#4311953 <https://reviews.llvm.org/D149635#4311953>, @xbjfk wrote:

>> Indeed. In particular, mingw toolchains don't have an alloca.h header - this should show up as failure from those jobs in CI.
>
> I see, maybe in this case alloca.h should only be included in the `#ifndef _LIBUNWIND_REMEMBER_HEAP_ALLOC` and under `__has_include`? not sure whether this is acceptable.
> or is this problem something for picolibc to solve? or the user by specifying `-include alloca.h`? how should this be fixed instead?

Well I guess technically libunwind is wrong here; if we do use alloca, we should include a corresponding header. The tricky thing is just that it's rather platform specific how to do that; see e.g. https://github.com/llvm/llvm-project/blob/llvmorg-16.0.0/openmp/runtime/src/kmp_wrapper_malloc.h#L93-L104 for one case of such an ifdef jungle.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D149635



More information about the libcxx-commits mailing list