]> granicus.if.org Git - clang/commit
Driver: Add magic handling for "reserved library names", starting with
authorDaniel Dunbar <daniel@zuster.org>
Fri, 17 Sep 2010 00:45:02 +0000 (00:45 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Fri, 17 Sep 2010 00:45:02 +0000 (00:45 +0000)
commite5a37f48388c7e4cc081f44d13a4910bfa56cd35
treecb11c2d5651d0fa1d51146e5aafc559a69a15ffe
parent2346513da49f0a3e4f0deaf198e708d18390b41e
Driver: Add magic handling for "reserved library names", starting with
-lstdc++. This is the best gross solution for a gross problem.

This issue is that historically, GCC has add -L options to its internally
library directories. This has allowed users and platforms to end up depending on
the layout of GCC's internal library directories.

We want to correct this mistake by eliminating that -L, but this means that
existing libraries which are in the GCC lib dir won't be found. We are going to
handle this by treating those -l names as "reserved", and requiring toolchains
to know how to add the right full path to the reserved library.

The immediately side effect of this is that users trying to use -L to find their
own -lstdc++ will need to start using -nostdlib (which is a good idea
anyway). Another side effect is that -stdlib=libc++ -lstdc++ will now do the
"right" thing, for curious definitions of right.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114144 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Driver/Options.td
lib/Driver/Driver.cpp
lib/Driver/Tools.cpp