Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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.
- Loading branch information