Skip to content

Connect helper C symbols to their static library#3010

Merged
cfallin merged 1 commit into
bytecodealliance:mainfrom
alexcrichton:fix-dylib
Jun 21, 2021
Merged

Connect helper C symbols to their static library#3010
cfallin merged 1 commit into
bytecodealliance:mainfrom
alexcrichton:fix-dylib

Conversation

@alexcrichton
Copy link
Copy Markdown
Member

This commit adds a #[link] annotation to the block defining symbols
coming from a native static library that we build and link. This is
required by rustc to get symbols to get exported correctly when linking
wasmtime into a Rust dynamic library instead of always as an rlib.

While I was at it I went ahead and renamed the symbols now that they're
no longer in C++ and they're doing setjmp/longjmp and not much else.

Closes #3006

This commit adds a `#[link]` annotation to the block defining symbols
coming from a native static library that we build and link. This is
required by rustc to get symbols to get exported correctly when linking
wasmtime into a Rust dynamic library instead of always as an rlib.

While I was at it I went ahead and renamed the symbols now that they're
no longer in C++ and they're doing setjmp/longjmp and not much else.

Closes bytecodealliance#3006
Copy link
Copy Markdown
Member

@cfallin cfallin left a comment

Choose a reason for hiding this comment

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

LGTM!

@cfallin cfallin merged commit 54a64ff into bytecodealliance:main Jun 21, 2021
@alexcrichton alexcrichton deleted the fix-dylib branch June 21, 2021 17:52
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.

Unable to compile when dynamically linking wasmtime crate.

2 participants