[Myriad]: add "<sysroot>/include" to standard search path

llvm-svn: 247948
This commit is contained in:
Douglas Katzman 2015-09-17 21:20:16 +00:00
parent 879b597b9d
commit b1278f3349
3 changed files with 18 additions and 0 deletions

View File

@ -3944,6 +3944,12 @@ MyriadToolChain::MyriadToolChain(const Driver &D, const llvm::Triple &Triple,
MyriadToolChain::~MyriadToolChain() {}
void MyriadToolChain::AddClangSystemIncludeArgs(const ArgList &DriverArgs,
ArgStringList &CC1Args) const {
if (!DriverArgs.hasArg(options::OPT_nostdinc))
addSystemInclude(DriverArgs, CC1Args, getDriver().SysRoot + "/include");
}
// MyriadToolChain handles several triples:
// {shave,sparc{,el}}-myriad-{rtems,unknown}-elf
Tool *MyriadToolChain::SelectTool(const JobAction &JA) const {

View File

@ -928,6 +928,9 @@ public:
const llvm::opt::ArgList &Args);
~MyriadToolChain() override;
void
AddClangSystemIncludeArgs(const llvm::opt::ArgList &DriverArgs,
llvm::opt::ArgStringList &CC1Args) const override;
Tool *SelectTool(const JobAction &JA) const override;
void getCompilerSupportDir(std::string &Dir) const;
void getBuiltinLibDir(std::string &Dir) const;

View File

@ -8,6 +8,15 @@
// LINK_WITH_RTEMS: Inputs/basic_myriad_tree/lib/gcc/sparc-myriad-elf/4.8.2/crtend.o
// LINK_WITH_RTEMS: Inputs/basic_myriad_tree/lib/gcc/sparc-myriad-elf/4.8.2/crtn.o
// RUN: %clang -### -E -target sparc-myriad --sysroot=/yow %s 2>&1 \
// RUN: | FileCheck %s -check-prefix=SLASH_INCLUDE
// SLASH_INCLUDE: "-isysroot" "/yow" "-internal-isystem" "/yow/include"
// RUN: %clang -### -E -target sparc-myriad --sysroot=/yow %s -nostdinc 2>&1 \
// RUN: | FileCheck %s -check-prefix=NO_SLASH_INCLUDE
// NO_SLASH_INCLUDE: "-isysroot" "/yow"
// NO_SLASH_INCLUDE-NOT: "-internal-isystem" "/yow/include"
// RUN: %clang -### -target what-myriad %s 2>&1 | FileCheck %s -check-prefix=BAD_ARCH
// BAD_ARCH: the target architecture 'what' is not supported by the target 'myriad'