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

Support __assert_fail in standalone wasm #9558

Merged
merged 1 commit into from
Oct 3, 2019
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
10 changes: 8 additions & 2 deletions tools/system_libs.py
Original file line number Diff line number Diff line change
Expand Up @@ -1189,14 +1189,20 @@ def get_files(self):
base_files = files_in_path(
path_components=['system', 'lib'],
filenames=['standalone_wasm.c'])
musl_files = files_in_path(
# It is more efficient to use JS methods for time, normally.
time_files = files_in_path(
path_components=['system', 'lib', 'libc', 'musl', 'src', 'time'],
filenames=['strftime.c',
'__month_to_secs.c',
'__tm_to_secs.c',
'__tz.c',
'__year_to_secs.c'])
return base_files + musl_files
# It is more efficient to use JS for __assert_fail, as it avoids always
# including fprintf etc.
exit_files = files_in_path(
path_components=['system', 'lib', 'libc', 'musl', 'src', 'exit'],
filenames=['assert.c'])
return base_files + time_files + exit_files

def can_build(self):
return shared.Settings.WASM_BACKEND
Expand Down