diff options
| author | Michal Gorny <mgorny@gentoo.org> | 2016-10-07 17:08:06 +0000 |
|---|---|---|
| committer | Michal Gorny <mgorny@gentoo.org> | 2016-10-07 17:08:06 +0000 |
| commit | 81684a0676efc6cfe39fd734055163f92c1e5d5f (patch) | |
| tree | 2d809c0be66e2fcdd37eea34026d985ccee7696d /clang/docs | |
| parent | 848556a0e26eb503d6d6ae3a976ae0208b02f9a2 (diff) | |
| download | bcm5719-llvm-81684a0676efc6cfe39fd734055163f92c1e5d5f.tar.gz bcm5719-llvm-81684a0676efc6cfe39fd734055163f92c1e5d5f.zip | |
[Driver] Make -print-libgcc-file-name print compiler-rt lib when used
Make the -print-libgcc-file-name option print an appropriate compiler
runtime library, that is libgcc.a if gcc runtime is used
and an appropriate compiler-rt library if that runtime is used.
The main use for this is to allow linking executables built with
-nodefaultlibs (e.g. to avoid linking to the standard C++ library) to
the compiler runtime library, e.g. using:
clang++ ... -nodefaultlibs $(clang++ ... -print-libgcc-file-name)
in which case currently a program built like this linked to the gcc
runtime unconditionally. The patch fixes it to use compiler-rt libraries
instead when compiler-rt is the active runtime.
Differential Revision: https://reviews.llvm.org/D25338
llvm-svn: 283572
Diffstat (limited to 'clang/docs')
| -rw-r--r-- | clang/docs/CommandGuide/clang.rst | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/docs/CommandGuide/clang.rst b/clang/docs/CommandGuide/clang.rst index 14c81270e17..c71544915e4 100644 --- a/clang/docs/CommandGuide/clang.rst +++ b/clang/docs/CommandGuide/clang.rst @@ -394,7 +394,8 @@ Driver Options .. option:: -print-libgcc-file-name - Print the library path for "libgcc.a". + Print the library path for the currently used compiler runtime library + ("libgcc.a" or "libclang_rt.builtins.*.a"). .. option:: -print-prog-name=<name> |

