Support __assert_fail in standalone wasm (#9558) · emscripten-core/emscripten@1ee0dfc
@@ -1189,14 +1189,20 @@ def get_files(self):
11891189base_files = files_in_path(
11901190path_components=['system', 'lib'],
11911191filenames=['standalone_wasm.c'])
1192-musl_files = files_in_path(
1192+# It is more efficient to use JS methods for time, normally.
1193+time_files = files_in_path(
11931194path_components=['system', 'lib', 'libc', 'musl', 'src', 'time'],
11941195filenames=['strftime.c',
11951196'__month_to_secs.c',
11961197'__tm_to_secs.c',
11971198'__tz.c',
11981199'__year_to_secs.c'])
1199-return base_files + musl_files
1200+# It is more efficient to use JS for __assert_fail, as it avoids always
1201+# including fprintf etc.
1202+exit_files = files_in_path(
1203+path_components=['system', 'lib', 'libc', 'musl', 'src', 'exit'],
1204+filenames=['assert.c'])
1205+return base_files + time_files + exit_files
1200120612011207def can_build(self):
12021208return shared.Settings.WASM_BACKEND