Skip to content

Conversation

tshortli
Copy link
Contributor

Avoids a compiler error when SWT_NO_DYNAMIC_LINKING is true.

Motivation:

Fixes the broken build, which is blocking Swift compiler PR testing.

Modifications:

Makes imageAddress a computed property when SWT_NO_DYNAMIC_LINKING is true so that it can be marked @available(*, unavailable).

@tshortli
Copy link
Contributor Author

@swift-ci please test

@ktoso
Copy link

ktoso commented Jan 17, 2025

Merging to unblock Swift CI.

real fix coming by @grynspan i hear

@stephentyrone stephentyrone merged commit 9042721 into swiftlang:main Jan 17, 2025
3 checks passed
@tshortli tshortli deleted the fix-wasi-build branch January 17, 2025 02:55
grynspan added a commit that referenced this pull request Jan 17, 2025
This reverts commit 9042721, reversing
changes made to dfa0d24.
grynspan added a commit that referenced this pull request Jan 17, 2025
Thank you to @tshortli for the patch! We don't actually _need_ this property to
be unavailable on WASI—it was just meant as a convenience. But since we're not
using the property for anything at this time (a future PR might try to
productize `TestContentRecord`), it's overkill.

So instead I'll just leave the property available, and document it's always
`nil` on statically-linked platforms.
grynspan added a commit that referenced this pull request Jan 17, 2025
Thank you to @tshortli for the patch! We don't actually _need_ this
property to be unavailable on WASI—it was just meant as a convenience.
But since we're not using the property for anything at this time (a
future PR might try to productize `TestContentRecord`), it's overkill.

So instead I'll just leave the property available, and document it's
always `nil` on statically-linked platforms.

### Checklist:

- [x] Code and documentation should follow the style of the [Style
Guide](https://github.com/apple/swift-testing/blob/main/Documentation/StyleGuide.md).
- [x] If public symbols are renamed or modified, DocC references should
be updated.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants