[all-commits] [llvm/llvm-project] 1e23a6: [PS4, PS5][Driver] Detangle --sysroot and -isysroot...
Edd Dawson via All-commits
all-commits at lists.llvm.org
Tue Sep 17 04:10:01 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 1e23a6142a827cda89fa4d8335afebd89701991d
https://github.com/llvm/llvm-project/commit/1e23a6142a827cda89fa4d8335afebd89701991d
Author: Edd Dawson <edd.dawson at sony.com>
Date: 2024-09-17 (Tue, 17 Sep 2024)
Changed paths:
M clang/lib/Driver/ToolChains/PS4CPU.cpp
M clang/lib/Driver/ToolChains/PS4CPU.h
M clang/test/Driver/ps4-linker.c
M clang/test/Driver/ps4-ps5-header-search.c
M clang/test/Driver/ps4-sdk-root.c
M clang/test/Driver/ps5-linker.c
M clang/test/Driver/ps5-sdk-root.c
Log Message:
-----------
[PS4,PS5][Driver] Detangle --sysroot and -isysroot (#107410)
The following discrepancies concerning `-isysroot` and `--sysroot`
motivated this change:
- The SDK directory can be specified via `-isysroot`, but `--sysroot`
has no influence over this. Yet, we check for the presence of either
switch to determine whether we ought to warn about a missing SDK
*headers*.
- The presence of `-isysroot` is ignored when deciding whether to warn
about missing SDK *libraries*, depsite it being the only switch capable
of specifying a non-default SDK location.
- The `--sysroot`s passed to the PlayStation linkers by the driver are
unrelated to the SDK directory resolved in the PS4PS5Base constructor.
Following this change, we attempt to derive an SDK root from a platform-
specific environment variable. Failing that, we derive it from the location of
the driver. This then becomes the default root directory for both header and
library search. `--sysroot` overrides both search roots. `-isysroot` overrides
only the header search root. If both are specified, `--sysroot` specifies the
library search root and `-isysroot` specifies the header search root.
For each search root that was not overridden, a warning is emitted if expected
header/library search paths are missing inside that root.
The test updates to ps{4,5}-sdk-root.c were of the scale of a rewrite so
I also took the opportunity to clarify the purpose of each part,
eliminate some redundancy and add some missing coverage.
SIE tracker: TOOLCHAIN-16704
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list