Skip to content

Commit

Permalink
Add test for GLOBAL_BASE and SIDE_MODULE error message. NFC (emsc…
Browse files Browse the repository at this point in the history
…ripten-core#23029)

These two options are not compatible, and `GLOBAL_BASE` is currently
just ignored in this mode.
  • Loading branch information
sbc100 authored Dec 2, 2024
1 parent 06cebfc commit c85a097
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/test_other.py
Original file line number Diff line number Diff line change
Expand Up @@ -1273,6 +1273,10 @@ def test_wl_stackfirst(self):
err = self.expect_fail(cmd + ['-sGLOBAL_BASE=1024'])
self.assertContained('error: --stack-first is not compatible with -sGLOBAL_BASE', err)

def test_side_module_global_base(self):
err = self.expect_fail([EMCC, test_file('hello_world.c'), '-Werror', '-sGLOBAL_BASE=1024', '-sSIDE_MODULE'])
self.assertContained('emcc: error: GLOBAL_BASE is not compatible with SIDE_MODULE', err)

@parameterized({
# In a simple -O0 build we do not set --low-memory-unused (as the stack is
# first, which is nice for debugging but bad for code size (larger globals)
Expand Down

0 comments on commit c85a097

Please sign in to comment.