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),
}
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());
llvm::Triple::x86_64)
Lib32 = true;
- getProgramPaths().push_back(getDriver().Dir + "/../libexec");
- getProgramPaths().push_back("/usr/libexec");
- if (Lib32) {
- getFilePaths().push_back("/usr/lib/i386");
- } else {
- getFilePaths().push_back("/usr/lib");
+ if (getDriver().UseStdLib) {
+ if (Lib32)
+ getFilePaths().push_back("=/usr/lib/i386");
+ else
+ getFilePaths().push_back("=/usr/lib");
}
}