aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/Driver.cpp
diff options
context:
space:
mode:
authorJoerg Sonnenberger <joerg@bec.de>2011-03-21 13:59:26 +0000
committerJoerg Sonnenberger <joerg@bec.de>2011-03-21 13:59:26 +0000
commit05e5930166333e382522b942f00d08abc6c0a28e (patch)
treea2ebce0c97e35dae5ab096563307687020aa062d /lib/Driver/Driver.cpp
parent8ab2bdcc4f397e100c684ede8e8ca6e226e1380a (diff)
Memorize presence/absence of -nostdlib in Driver.
Drop program paths on NetBSD (unused). Only include lib dir, if -nostdlib is absent. Use = to allow --sysroot to work. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@127995 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Driver.cpp')
-rw-r--r--lib/Driver/Driver.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp
index fac8c8c88f..ef647d8c06 100644
--- a/lib/Driver/Driver.cpp
+++ b/lib/Driver/Driver.cpp
@@ -58,8 +58,8 @@ Driver::Driver(llvm::StringRef _ClangExecutable,
bool IsProduction, bool CXXIsProduction,
Diagnostic &_Diags)
: Opts(createDriverOptTable()), Diags(_Diags),
- ClangExecutable(_ClangExecutable), DefaultHostTriple(_DefaultHostTriple),
- DefaultImageName(_DefaultImageName),
+ ClangExecutable(_ClangExecutable), UseStdLib(true),
+ DefaultHostTriple(_DefaultHostTriple), DefaultImageName(_DefaultImageName),
DriverTitle("clang \"gcc-compatible\" driver"),
Host(0),
CCPrintOptionsFilename(0), CCPrintHeadersFilename(0), CCCIsCXX(false),
@@ -289,6 +289,8 @@ Compilation *Driver::BuildCompilation(int argc, const char **argv) {
}
if (const Arg *A = Args->getLastArg(options::OPT__sysroot_EQ))
SysRoot = A->getValue(*Args);
+ if (Args->hasArg(options::OPT_nostdlib))
+ UseStdLib = false;
Host = GetHostInfo(DefaultHostTriple.c_str());