Skip to content
Open
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
4 changes: 2 additions & 2 deletions test/codesize/test_codesize_minimal_O0.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
"a.out.js": 19493,
"a.out.js.gz": 7010,
"a.out.nodebug.wasm": 1136,
"a.out.nodebug.wasm.gz": 659,
"a.out.nodebug.wasm.gz": 656,
"total": 20629,
"total_gz": 7669,
"total_gz": 7666,
"sent": [],
"imports": [],
"exports": [
Expand Down
4 changes: 4 additions & 0 deletions test/test_other.py
Original file line number Diff line number Diff line change
Expand Up @@ -7983,6 +7983,10 @@ def test_warn_unexported_main(self, filename, args):
output = self.run_js('a.out.js')
self.assertEqual('', output)

def test_no_entry_with_assertions(self):
self.run_process([EMCC, test_file('hello_world.c'), '--no-entry', '-sASSERTIONS'])
self.assertNotContained('hello, world!', self.run_js('a.out.js'))

def test_source_file_with_fixed_language_mode(self):
create_file('src_tmp_fixed_lang', '''
#include <string>
Expand Down
2 changes: 1 addition & 1 deletion tools/link.py
Original file line number Diff line number Diff line change
Expand Up @@ -1096,7 +1096,7 @@ def limit_incoming_module_api():

if '_main' in settings.EXPORTED_FUNCTIONS or 'main' in settings.EXPORT_IF_DEFINED:
settings.EXPORT_IF_DEFINED.append('__main_argc_argv')
elif settings.ASSERTIONS and not settings.STANDALONE_WASM:
elif settings.ASSERTIONS and not settings.STANDALONE_WASM and not options.no_entry:
# In debug builds when `main` is not explicitly requested as an
# export we still add it to EXPORT_IF_DEFINED so that we can warn
# users who forget to explicitly export `main`.
Expand Down