Commit Graph

2 Commits

Author SHA1 Message Date
Dan Albert f5ffa1a67c [Driver] Also obey -nostdlib++ when rewriting -lstdc++.
Reviewers: pirama

Reviewed By: pirama

Subscribers: cfe-commits

Differential Revision: https://reviews.llvm.org/D55856

llvm-svn: 349570
2018-12-18 23:29:35 +00:00
Nico Weber 0ee47d92b2 Introduce -nostdlib++ flag to disable linking the C++ standard library.
Projects that want to statically link their own C++ standard library currently
need to pass -nostdlib or -nodefaultlibs, which also disables linking of the
builtins library, -lm, and so on. Alternatively, they could use `clang` instead
of `clang++`, but that already disables implicit addition of -lm on some
toolchains.

Add a dedicated flag -nostdlib++ that disables just linking of libc++ /
libstdc++. This is analogous to -nostdinc++.

https://reviews.llvm.org/D35780

llvm-svn: 308997
2017-07-25 18:02:57 +00:00