[Myriad]: -nostdlib implies -nostartfiles

llvm-svn: 253390
This commit is contained in:
Douglas Katzman 2015-11-17 22:33:34 +00:00
parent 8601733c1c
commit 9d40374880
2 changed files with 2 additions and 1 deletions

View File

@ -9941,7 +9941,7 @@ void tools::Myriad::Linker::ConstructJob(Compilation &C, const JobAction &JA,
static_cast<const toolchains::MyriadToolChain &>(getToolChain()); static_cast<const toolchains::MyriadToolChain &>(getToolChain());
const llvm::Triple &T = TC.getTriple(); const llvm::Triple &T = TC.getTriple();
ArgStringList CmdArgs; ArgStringList CmdArgs;
bool UseStartfiles = !Args.hasArg(options::OPT_nostartfiles); bool UseStartfiles = !Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles);
bool UseDefaultLibs = bool UseDefaultLibs =
!Args.hasArg(options::OPT_nostdlib, options::OPT_nodefaultlibs); !Args.hasArg(options::OPT_nostdlib, options::OPT_nodefaultlibs);

View File

@ -68,6 +68,7 @@
// STDLIBCXX: "-lstdc++" "-lc" "-lgcc" // STDLIBCXX: "-lstdc++" "-lc" "-lgcc"
// RUN: %clang -target sparc-myriad -### -nostdlib %s 2>&1 | FileCheck %s --check-prefix=NOSTDLIB // RUN: %clang -target sparc-myriad -### -nostdlib %s 2>&1 | FileCheck %s --check-prefix=NOSTDLIB
// NOSTDLIB-NOT: crtbegin.o
// NOSTDLIB-NOT: "-lc" // NOSTDLIB-NOT: "-lc"
// RUN: %clang -### -c -g %s -target sparc-myriad 2>&1 | FileCheck -check-prefix=G_SPARC %s // RUN: %clang -### -c -g %s -target sparc-myriad 2>&1 | FileCheck -check-prefix=G_SPARC %s