Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions clang/lib/Driver/ToolChains/PS4CPU.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,9 @@ toolchains::PS4PS5Base::PS4PS5Base(const Driver &D, const llvm::Triple &Triple,
// control of header or library search. If we're not linking, don't check
// for missing libraries.
auto CheckSDKPartExists = [&](StringRef Dir, StringRef Desc) {
// In ThinLTO code generation mode SDK files are not required.
if (Args.hasArgNoClaim(options::OPT_fthinlto_index_EQ))
return true;
if (llvm::sys::fs::exists(Dir))
return true;
D.Diag(clang::diag::warn_drv_unable_to_find_directory_expected)
Expand Down
7 changes: 7 additions & 0 deletions clang/test/Driver/ps4-sdk-root.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
///
/// The default <SDKROOT> for both headers and libraries is taken from the
/// SCE_ORBIS_SDK_DIR environment variable.
///
/// In ThinLTO code generation mode (-fthinlto-index=) SDK files are not required
/// so all warnings are suppressed.

// RUN: echo "-### -Winvalid-or-nonexistent-directory -target x86_64-scei-ps4" > %t.rsp

Expand All @@ -31,6 +34,10 @@
/// headers and libraries.
// RUN: env SCE_ORBIS_SDK_DIR=.. %clang @%t.rsp %s 2>&1 | FileCheck -check-prefixes=WARN-SYS-HEADERS,WARN-SYS-LIBS,NO-WARN %s

/// -fthinlto-index= warning suppression.
// RUN: touch %t_dummy.o
// RUN: env SCE_ORBIS_SDK_DIR=.. %clang @%t.rsp %t_dummy.o -fthinlto-index=ignored -c 2>&1 | FileCheck -check-prefixes=NO-WARN %s

/// If `-c`, `-S`, `-E` or `-emit-ast` is supplied, the existence check for SDK
/// libraries is skipped because no linking will be performed. We only expect
/// warnings about missing headers.
Expand Down
7 changes: 7 additions & 0 deletions clang/test/Driver/ps5-sdk-root.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
///
/// The default <SDKROOT> for both headers and libraries is taken from the
/// SCE_PROSPERO_SDK_DIR environment variable.
///
/// In ThinLTO code generation mode (-fthinlto-index=) SDK files are not required
/// so all warnings are suppressed.

// RUN: echo "-### -Winvalid-or-nonexistent-directory -target x86_64-sie-ps5" > %t.rsp

Expand All @@ -33,6 +36,10 @@
/// headers and libraries.
// RUN: env SCE_PROSPERO_SDK_DIR=.. %clang @%t.rsp %s 2>&1 | FileCheck -check-prefixes=WARN-SYS-HEADERS,WARN-SYS-LIBS,NO-WARN %s

/// -fthinlto-index= warning suppression.
// RUN: touch %t_dummy.o
// RUN: env SCE_PROSPERO_SDK_DIR=.. %clang @%t.rsp %t_dummy.o -fthinlto-index=ignored -c 2>&1 | FileCheck -check-prefixes=NO-WARN %s

/// If `-c`, `-S`, `-E` or `-emit-ast` is supplied, the existence check for SDK
/// libraries is skipped because no linking will be performed. We only expect
/// warnings about missing headers.
Expand Down
Loading