Skip to content

Commit 683f410

Browse files
author
Simon Moll
committed
Revert "Revert "[clang][ve] expect libc++ headers installed at top-level of the Clang prefix (this happens also to be the default install target)""
This reverts commit 4c13bdd.
1 parent 1ad0e72 commit 683f410

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

clang/lib/Driver/ToolChains/VEToolchain.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -117,11 +117,13 @@ void VEToolChain::AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs,
117117
StringRef(cl_include_dir).split(Dirs, StringRef(EnvPathSeparatorStr));
118118
ArrayRef<StringRef> DirVec(Dirs);
119119
addSystemIncludes(DriverArgs, CC1Args, DirVec);
120-
} else {
121-
SmallString<128> P(getDriver().ResourceDir);
122-
llvm::sys::path::append(P, "include/c++/v1");
123-
addSystemInclude(DriverArgs, CC1Args, P);
120+
return;
124121
}
122+
123+
// libc++ installed in CMAKE_INSTALL_PREFIX by default.
124+
SmallString<128> P(getDriver().ResourceDir);
125+
llvm::sys::path::append(P, "/../../../include/c++/v1");
126+
addSystemInclude(DriverArgs, CC1Args, P);
125127
}
126128

127129
void VEToolChain::AddCXXStdlibLibArgs(const ArgList &Args,

0 commit comments

Comments
 (0)