Skip to content
Merged
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
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)

Copy link
Member

Choose a reason for hiding this comment

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

Testing a side module instead would be faster, and also be future compatible if we ever make main modules non-relocatable. But just a suggestion, lgtm either way.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The error happens before we do any actual linking work so its just as fast either way.

@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