diff options
Diffstat (limited to 'src/test/run-make/wasm-symbols-different-module/foo.rs')
-rw-r--r-- | src/test/run-make/wasm-symbols-different-module/foo.rs | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/test/run-make/wasm-symbols-different-module/foo.rs b/src/test/run-make/wasm-symbols-different-module/foo.rs new file mode 100644 index 000000000..a4ba7e714 --- /dev/null +++ b/src/test/run-make/wasm-symbols-different-module/foo.rs @@ -0,0 +1,23 @@ +#![crate_type = "cdylib"] + +mod a { + #[link(wasm_import_module = "a")] + extern "C" { + pub fn foo(); + } +} + +mod b { + #[link(wasm_import_module = "b")] + extern "C" { + pub fn foo(); + } +} + +#[no_mangle] +pub fn start() { + unsafe { + a::foo(); + b::foo(); + } +} |