[clang] [PS4/PS5][Driver] Observe <sysroot>/target/lib for libraries (PR #123350)
Edd Dawson via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 21 09:48:44 PST 2025
================
@@ -174,25 +174,26 @@
// Test implicit library search paths are supplied to the linker, after any
// search paths specified by the user. <sdk-root>/target/lib is implicitly
-// added if it exists and no --sysroot is specified. CRT objects are found
-// there. "." is always implicitly added to library search paths. This is
-// long-standing behavior, unique to PlayStation toolchains.
+// added if it exists. CRT objects are found there. "." is always implicitly
+// added to library search paths. This is long-standing behavior, unique to
+// PlayStation toolchains.
// RUN: rm -rf %t.dir && mkdir %t.dir
// RUN: env SCE_PROSPERO_SDK_DIR=%t.dir %clang --target=x64_64-sie-ps5 %s -### -Luser 2>&1 | FileCheck --check-prefixes=CHECK-NO-TARGETLIB %s
-// RUN: env SCE_PROSPERO_SDK_DIR=%t.dir %clang --target=x64_64-sie-ps5 %s -### -Luser --sysroot=%t.dir 2>&1 | FileCheck --check-prefixes=CHECK-NO-TARGETLIB %s
+// RUN: env SCE_PROSPERO_SDK_DIR=. %clang --target=x64_64-sie-ps5 %s -### -Luser --sysroot=%t.dir 2>&1 | FileCheck --check-prefixes=CHECK-NO-TARGETLIB %s
----------------
playstation-edd wrote:
Not stupid at all. The purpose of these lines is (now) to show that the same behaviour occurs regardless of whether the sdk-root comes from the environment or the CLI. `.` was picked because it was not the same as `%t.dir`, passed via `--sysroot`.
I have pushed a change that simply removes the `env SCE_PROSPERO_SDK_DIR=.` when a `--sysroot` is supplied. Hopefully clearer!(?)
https://github.com/llvm/llvm-project/pull/123350
More information about the cfe-commits
mailing list