diff options
author | Shantonu Sen <ssen@apple.com> | 2010-09-17 18:39:08 +0000 |
---|---|---|
committer | Shantonu Sen <ssen@apple.com> | 2010-09-17 18:39:08 +0000 |
commit | 7433fedce98a58341d0f30c2e12e8d53f3bba575 (patch) | |
tree | b1a382bba20482b5de15c7352950c4c427a9214f /lib/Driver/Driver.cpp | |
parent | 7f18e67e1b577a50402e8b43508ab2311a5c45b5 (diff) |
Driver: implement driver automagic support for -lcc_kext
Rewrite linker arguments to use libclang_rt.cc_kext.a
instead of gcc-specific libcc_kext.a
Resolves Radar 7808495
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114193 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Driver.cpp')
-rw-r--r-- | lib/Driver/Driver.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp index e24f017ceb..86e1161169 100644 --- a/lib/Driver/Driver.cpp +++ b/lib/Driver/Driver.cpp @@ -158,15 +158,23 @@ DerivedArgList *Driver::TranslateInputArgs(const InputArgList &Args) const { continue; } - // Rewrite reserved library names, unless -nostdlib is present. - if (!HasNostdlib && A->getOption().matches(options::OPT_l)) { + // Rewrite reserved library names. + if (A->getOption().matches(options::OPT_l)) { llvm::StringRef Value = A->getValue(Args); - if (Value == "stdc++") { + // Rewrite unless -nostdlib is present. + if (!HasNostdlib && Value == "stdc++") { DAL->AddFlagArg(A, Opts->getOption( options::OPT_Z_reserved_lib_stdcxx)); continue; } + + // Rewrite unconditionally. + if (Value == "cc_kext") { + DAL->AddFlagArg(A, Opts->getOption( + options::OPT_Z_reserved_lib_cckext)); + continue; + } } DAL->append(*it); |