[PATCH] D37726: clang: alias -static-{libstdc++, libgcc} for LLVM variants

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 12 17:58:13 PDT 2018


MaskRay added a comment.

In https://reviews.llvm.org/D37726#1264233, @rsmith wrote:

> It would be nice to have a flag here that's agnostic to the value supplied to `-rtlib` or `-stdlib`. Perhaps `-static-rtlib` (for either libgcc or compiler-rt) and `-static-stdlib` (for either libc++ or libstdc++). (Yes, it's bad that we use `stdlib` to mean "the C++ standard library", but that is the status quo.)


https://reviews.llvm.org/rC113891 introduced `-stdlib`... yes it would be nice if it were named `-c++stdlib` or `-cxxstdlib`... (I'm not good at naming)

We don't need to be 100% compatible with gcc here.. `--push-state` `-Bstatic` `-lc++/-lstdc++` `--pop-state` can also be used. `--pop-state` works with ld.bfd/gold/lld


Repository:
  rL LLVM

https://reviews.llvm.org/D37726





More information about the llvm-commits mailing list