[Driver] Use -push-/-pop-state and -as-needed for libc++ on Fuchsia
authorPetr Hosek <phosek@chromium.org>
Sat, 3 Nov 2018 01:43:25 +0000 (01:43 +0000)
committerPetr Hosek <phosek@chromium.org>
Sat, 3 Nov 2018 01:43:25 +0000 (01:43 +0000)
commitc39b97f2112e015cd463ddc434945ba04dba687d
treee9cd97fd2e7f8816a2355be9ad8d7a444b07eab3
parent4dc4d6eacafd72598afdc73c360f398d140976d3
[Driver] Use -push-/-pop-state and -as-needed for libc++ on Fuchsia

This avoids introducing unnecessary DT_NEEDED entries when using
C++ driver for linking C code or C++ code that doesn't use C++
standard library.

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

llvm-svn: 346064
clang/lib/Driver/ToolChains/Fuchsia.cpp
clang/test/Driver/fuchsia.cpp