Skip to content

Commit 6160323

Browse files
authored
Add some new musl math files to libc-rt library (#15497)
We have had reports of missing symbols in LTO builds after the musl upgrade (#13006): https://groups.google.com/g/emscripten-discuss/c/g_vkRRSCPUI/m/aT6fnUAtCQAJ?utm_medium=email&utm_source=footer Also `lto2.test_float_builtinsTest` started failing on the emscripten-releases FYI waterfall. This change moves some of the new math-related source files into the libc-mt library which is excluded from LTO (see comments in in system_libs.py for background on this). Fixes: #15506
1 parent d8c78d6 commit 6160323

File tree

1 file changed

+13
-3
lines changed

1 file changed

+13
-3
lines changed

tools/system_libs.py

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,10 +108,20 @@ def get_wasm_libc_rt_files():
108108
'fmin.c', 'fminf.c', 'fminl.c',
109109
'fmax.c', 'fmaxf.c', 'fmaxl.c',
110110
'fmod.c', 'fmodf.c', 'fmodl.c',
111-
'log2.c', 'log2f.c', 'log10.c', 'log10f.c',
112-
'exp2.c', 'exp2f.c', 'exp10.c', 'exp10f.c',
111+
'log.c', 'log_data.c',
112+
'logf.c', 'logf_data.c',
113+
'log2.c', 'log2_data.c',
114+
'log2f.c', 'log2f_data.c',
115+
'log10.c', 'log10f.c',
116+
'exp.c', 'exp_data.c',
117+
'exp2.c',
118+
'exp2f.c', 'exp2f_data.c',
119+
'exp10.c', 'exp10f.c',
113120
'scalbn.c', '__fpclassifyl.c',
114-
'__signbitl.c', '__signbitf.c', '__signbit.c'
121+
'__signbitl.c', '__signbitf.c', '__signbit.c',
122+
'__math_divzero.c', '__math_divzerof.c',
123+
'__math_oflow.c', '__math_oflowf.c',
124+
'__math_uflow.c', '__math_uflowf.c',
115125
])
116126
other_files = files_in_path(
117127
path='system/lib/libc',

0 commit comments

Comments
 (0)