JavaScript Backend: Implement compiling and linking c-sources with emscripten
Description
The JS backend uses emscripten to compile any C files a library or program relies on. Unfortunately our linker does not handle the resulting object files yet and so these do not get linked into the final payload and we error out in the Linker.
This ticket is the tracking ticket to implement this feature.
Impacted Tests
We've skipped the following tests until this feature lands, be sure to check them off as you re-enable them. To generate the list search for req_c
or do: rg -B3 'req_c' | rg -e 'test\(\'.*\'' > 22367-tests
-
multipleHomeUnits_odir passes -
T5462Yes1 passes -
T5462Yes2 passes -
T20010 passes -
T20010-ghci passes -
RepPolyArrowCmd passes -
RepPolyArrowFun passes -
RepPolyBackpack1 passes -
RepPolyBackpack2 passes -
RepPolyBackpack3 passes -
RepPolyBackpack4 passes -
bkprun01 passes -
bkprun02 passes -
bkprun03 passes -
bkprun04 passes -
bkprun05 passes -
bkprun06 passes -
bkprun07 passes -
bkprun08 passes -
bkprun09 passes -
T13955 passes -
T15138 passes -
T15379 passes -
ccfail004 passes -
ccfail005 passes -
ccall_value passes -
capi_value_function passes -
UnsafeReenter passes -
ffi005 passes -
ffi015 passes -
T1679 passes -
T1288 passes -
T2276 passes -
T2469 passes -
T2594 passes -
fptrfail01 passes -
T4038 passes -
T4221 passes -
Capi_Ctype_002 passes -
ffi_parsing_001 passes -
T4012 passes -
T8083 passes -
T12134 passes -
T12614 passes -
T14624 passes -
T15933 passes -
T16650a passes -
T16650b passes -
T16650c passes -
T16650d passes -
PrimFFIInt8 passes -
PrimFFIWord8 passes -
PrimFFIInt16 passes -
PrimFFIWord16 passes -
PrimFFIInt32 passes -
PrimFFIWord32 passes -
T493 passes -
UnliftedNewtypesByteArrayOffset passes -
T17471 passes -
T19237 passes -
T4059 passes -
T7040 passes -
T10904 passes -
T11829 passes -
T16514 passes -
InitEventLogging passes -
T20199 passes -
cloneMyStack passes -
cloneMyStack_retBigStackFrame passes -
cloneThreadStack passes -
T11223_simple_link passes -
T11223_simple_link_lib passes -
T11223_simple_unused_duplicate_lib passes -
T11223_link_order_a_b_succeed passes -
T11223_link_order_b_a_succeed passes -
T11223_link_order_a_b_2_fail passes -
T11223_link_order_b_a_2_succeed passes -
T20137 passes -
T20735 passes -
T16846 passes -
T17920 passes -
T18527 passes -
load_short_name passes -
T12674w passes -
T12674 passes -
recomp004 passes -
T5594 passes -
T5402 passes
Previous Work
Edited by jeffrey young