Skip to content

Fix SUPPORT_BIG_ENDIAN settings #21752

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

Merged
merged 1 commit into from
Apr 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/runtime_shared.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
function updateMemoryViews() {
var b = wasmMemory.buffer;
#if SUPPORT_BIG_ENDIAN
{{{ maybeExport('HEAP_DATA_VIEW') }}} HEAP_DATA_VIEW = new DataView(b);
{{{ maybeExportHeap('HEAP_DATA_VIEW') }}} HEAP_DATA_VIEW = new DataView(b);
#endif
{{{ maybeExportHeap('HEAP8') }}}HEAP8 = new Int8Array(b);
{{{ maybeExportHeap('HEAP16') }}}HEAP16 = new Int16Array(b);
Expand Down
4 changes: 4 additions & 0 deletions test/test_other.py
Original file line number Diff line number Diff line change
Expand Up @@ -14657,3 +14657,7 @@ def test_mimalloc_headers(self):
}
'''
self.do_run(src, emcc_args=['-sMALLOC=mimalloc'])

def test_SUPPORT_BIG_ENDIAN(self):
# Just a simple build-only test for now
self.run_process([EMCC, '-sSUPPORT_BIG_ENDIAN', test_file('hello_world.c')])