Skip to content

Commit

Permalink
Fix multiple definitions of emscripten_memcpy_big in standalone mode (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
sbc100 committed May 17, 2023
1 parent fba7c2e commit 4e01e02
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion system/lib/standalone/standalone.c
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ weak int getentropy(void* buffer, size_t length) {
// Emscripten additions

// Should never be called in standalone mode
void emscripten_memcpy_big(void *restrict dest, const void *restrict src, size_t n) {
weak void emscripten_memcpy_big(void *restrict dest, const void *restrict src, size_t n) {
__builtin_unreachable();
}

Expand Down
5 changes: 5 additions & 0 deletions test/test_other.py
Original file line number Diff line number Diff line change
Expand Up @@ -13488,3 +13488,8 @@ def test_preload_module(self, args):
}
''')
self.do_runf('main.c', 'done\n', emcc_args=['-sMAIN_MODULE=2', '--preload-file', 'tmp.so@library.so', '--use-preload-plugins'] + args)

@node_pthreads
def test_standalone_whole_archive(self):
self.emcc_args += ['-sSTANDALONE_WASM', '-pthread', '-Wl,--whole-archive', '-lbulkmemory', '-lstandalonewasm', '-Wl,--no-whole-archive']
self.do_runf(test_file('hello_world.c'))

0 comments on commit 4e01e02

Please sign in to comment.