Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't use swift_enumerateAllMetadataSections() on WASI. #730

Merged
merged 3 commits into from
Sep 24, 2024

Conversation

grynspan
Copy link
Contributor

@grynspan grynspan commented Sep 24, 2024

On WASI, there is only a single statically-linked binary, so we don't need to use swift_enumerateAllMetadataSections() and can just directly access the bounds of the metadata section(s) we care about.

Checklist:

  • Code and documentation should follow the style of the Style Guide.
  • If public symbols are renamed or modified, DocC references should be updated.

@grynspan grynspan added enhancement New feature or request performance Performance issues wasi/wasm 🧭 WebAssembly support labels Sep 24, 2024
@grynspan grynspan added this to the Swift 6.1 milestone Sep 24, 2024
@grynspan grynspan self-assigned this Sep 24, 2024
@grynspan
Copy link
Contributor Author

@swift-ci test

@@ -213,24 +213,8 @@ struct SWTTypeMetadataRecord {
}
};

#if defined(SWT_NO_DYNAMIC_LINKING)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved this bit down to clarify it's "Apple with static linking" rather than all static-linked cases. The code isn't changed.

@grynspan
Copy link
Contributor Author

Tested with wasmtime!

@grynspan
Copy link
Contributor Author

@swift-ci test

On WASI, there is only a single statically-linked binary, so we don't need to
use `swift_enumerateAllMetadataSections()` and can just directly access the
bounds of the metadata section(s) we care about.
@grynspan grynspan force-pushed the jgrynspan/wasi-no-swift_enumerateAllMetadataSections branch from 18d5810 to a5e98bb Compare September 24, 2024 22:07
@grynspan
Copy link
Contributor Author

@swift-ci test

@grynspan grynspan merged commit 05890bc into main Sep 24, 2024
3 checks passed
@grynspan grynspan deleted the jgrynspan/wasi-no-swift_enumerateAllMetadataSections branch September 24, 2024 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request performance Performance issues wasi/wasm 🧭 WebAssembly support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants