[all-commits] [llvm/llvm-project] 38cc03: [PS5][Driver] Restore whole-archive state when `-f...

Edd Dawson via All-commits all-commits at lists.llvm.org
Wed Nov 6 10:20:31 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 38cc03f78e3046837d8fc29d729bc2cee0c31e89
      https://github.com/llvm/llvm-project/commit/38cc03f78e3046837d8fc29d729bc2cee0c31e89
  Author: Edd Dawson <edd.dawson at sony.com>
  Date:   2024-11-06 (Wed, 06 Nov 2024)

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

  Log Message:
  -----------
  [PS5][Driver] Restore whole-archive state when `-fjmc` (#115181)

`--whole-archive` is passed to the linker to have it consume all objects
within the SIE Just My Code library, rather than just those that fulfil
outstanding references.

Prior to this change, `--no-whole-archive` was used to reset the
associated archive handling state in the linker, under the assumption
that `--whole-archive` wasn't already in effect. But that assumption may
be incorrect. So use `--push/pop-state` to restore the previous state,
whatever that may be.

Given the position of these switches on the link line, the problem
described with the outgoing code is unlikely to cause an issue in
practice. But push/pop protect against accidents due to future additions
to and reorderings of arguments.

PS5 only. The proprietary PS4 linker doesn't support `--push/pop-state`,
or an equivalent.

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