[all-commits] [llvm/llvm-project] f574b9: [PS4, PS5][Driver] Check for absent SDK when -nostd...

Edd Dawson via All-commits all-commits at lists.llvm.org
Wed Sep 4 12:36:46 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f574b9c9297538a8d471658564619be3ad6e87dd
      https://github.com/llvm/llvm-project/commit/f574b9c9297538a8d471658564619be3ad6e87dd
  Author: Edd Dawson <edd.dawson at sony.com>
  Date:   2024-09-04 (Wed, 04 Sep 2024)

  Changed paths:
    M clang/lib/Driver/ToolChains/PS4CPU.cpp
    M clang/test/Driver/ps4-sdk-root.c
    M clang/test/Driver/ps5-sdk-root.c

  Log Message:
  -----------
  [PS4,PS5][Driver] Check for absent SDK when -nostdlib/-nodefaultlibs (#107112)

The PlayStation drivers emit warnings if it looks like SDK libraries are
missing. Until this point, the check was skipped when either `-nostdlib`
or `-nodefaultlibs` was supplied. I believe the idea is that if you
aren't linking default libraries, you won't be in need of the SDK.

However, in a situation where these switches are supplied, users may
still want to pass `-lSomeSDKLib` to the driver/linker with the
expectation that libSomeSDKLib.a will be sourced from the SDK. That is,
`-nodefaultlibs` and `-nostdlib` affect the libraries passed to the
linker, but not the library search paths.

So this change removes `-nostdlib`/`-nodefaultlibs` from consideration
when deciding whether or not to probe for the SDK's existence.

N.B. complete behaviour for `-nostdlib` and `-nodefaultlibs` is yet to
be added to the PlayStation compiler drivers. Coming soon.

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