I took care of the build problem in the commit 250252.
Resubmitting the patch. This patch adds missing pieces to clang, including the PS4 toolchain definition, added warnings, PS4 defaults, and Driver changes needed for our compiler. A patch by Filipe Cabecinhas, Pierre Gousseau and Katya Romanova! Differential Revision: http://reviews.llvm.org/D13482 llvm-svn: 250262
This commit is contained in:
@@ -215,6 +215,7 @@ void InitHeaderSearch::AddDefaultCIncludePaths(const llvm::Triple &triple,
|
||||
case llvm::Triple::OpenBSD:
|
||||
case llvm::Triple::Bitrig:
|
||||
case llvm::Triple::NaCl:
|
||||
case llvm::Triple::PS4:
|
||||
break;
|
||||
case llvm::Triple::Win32:
|
||||
if (triple.getEnvironment() != llvm::Triple::Cygnus)
|
||||
@@ -318,6 +319,28 @@ void InitHeaderSearch::AddDefaultCIncludePaths(const llvm::Triple &triple,
|
||||
case llvm::Triple::RTEMS:
|
||||
case llvm::Triple::NaCl:
|
||||
break;
|
||||
case llvm::Triple::PS4: {
|
||||
// <isysroot> gets prepended later in AddPath().
|
||||
std::string BaseSDKPath = "";
|
||||
if (!HasSysroot) {
|
||||
const char *envValue = getenv("SCE_PS4_SDK_DIR");
|
||||
if (envValue)
|
||||
BaseSDKPath = envValue;
|
||||
else {
|
||||
// HSOpts.ResourceDir variable contains the location of Clang's
|
||||
// resource files.
|
||||
// Assuming that Clang is configured for PS4 without
|
||||
// --with-clang-resource-dir option, the location of Clang's resource
|
||||
// files is <SDK_DIR>/host_tools/lib/clang
|
||||
SmallString<128> P = StringRef(HSOpts.ResourceDir);
|
||||
llvm::sys::path::append(P, "../../..");
|
||||
BaseSDKPath = P.str();
|
||||
}
|
||||
}
|
||||
AddPath(BaseSDKPath + "/target/include", System, false);
|
||||
if (triple.isPS4CPU())
|
||||
AddPath(BaseSDKPath + "/target/include_common", System, false);
|
||||
}
|
||||
default:
|
||||
AddPath("/usr/include", ExternCSystem, false);
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user