[PATCH] D57128: Add --unwindlib=[libgcc|compiler-rt] to parallel --rtlib=

Petr Hosek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 29 00:57:59 PST 2019


phosek added a comment.

In D57128#1375049 <https://reviews.llvm.org/D57128#1375049>, @kristina wrote:

> In D57128#1375040 <https://reviews.llvm.org/D57128#1375040>, @mstorsjo wrote:
>
> > FWIW, this also broke my bootstraps of mingw-w64 environments/toolchains. After building compiler-rt builtins, before having any libunwind/libcxx built, I previously regarded my toolchain as complete for building and testing C apps and libraries, but that fails now.
> >
> > Would it be possible to add a third alternative, `--unwindlib=none`, to signal that while I'm using `--rtlib=compiler-rt`, I don't want to link to any unwinder? (In my case, I'm injecting libunwind in libc++.a so it only gets added when linking C++ code.) Or at least make it possible to only add this linker flag when linking C++? Alternatively I'll need to provide a dummy `libunwind.a` until the real one has been built.
>
>
> +1 on this, although consolidated libc++/libc++abi/libunwind_llvm have been supported "experimentally" for at least two years now, if this somehow breaks it, I think a lot of users would be frustrated.
>
> (Also is it time to make merging libc++.a and libc++abi.a not-an-experimental (in CMake) feature anymore?).


+2 this is how we're shipping static libunwind in our (Fuchsia) toolchain for all platforms, we merge it (together with `libc++abi.a`) into `libc++.a`, so beyond the bootstrap issues, this change is going to break our build unless we provide dummy `libunwind.a`. Ideally there should be a vendor flag (e.g. a CMake option) to set this as default when building Clang (akin to `CLANG_DEFAULT_CXX_STDLIB` <https://github.com/llvm/llvm-project/blob/master/clang/CMakeLists.txt#L244> and `CLANG_DEFAULT_RTLIB` <https://github.com/llvm/llvm-project/blob/master/clang/CMakeLists.txt#L254>), having to manually always set `--unwindlib=none` for every compiler invocation is going to be incredibly annoying.


Repository:
  rL LLVM

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

https://reviews.llvm.org/D57128





More information about the llvm-commits mailing list