Repository navigation
Commit a085400
[wasi] CoreLib load: exepath via CORE_ROOT, file mapping via open()
* minipal_getexepath: split TARGET_WASM into TARGET_BROWSER (unchanged,
returns '/') and TARGET_WASI (returns CORE_ROOT + '/corerun.wasm').
SystemDomain::Init derives the system directory from the exe path; on
WASI argv[0] is unreliable so we use the host-provided CORE_ROOT.
* pal/src/map/map.cpp InternalCreateFileMapping: WASI has no dup() and
rejects fcntl(F_DUPFD_CLOEXEC). Re-open the file by its path so the
mapping owns a separate fd. Same fix pattern as init_std_handle.
With these in place HelloWorld now loads System.Private.CoreLib, binds
the default app domain, and reaches the CILInterp path. It currently
asserts inside PortableEntryPoint::GetActualCode while compiling an
ldftn (real interpreter integration work, no longer PAL plumbing).
Co-authored-by: Copilot <[email protected]>1 parent e4b0360 commit a085400
2 files changed
Lines changed: 31 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
466 | 466 | | |
467 | 467 | | |
468 | 468 | | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
469 | 475 | | |
| 476 | + | |
470 | 477 | | |
471 | 478 | | |
472 | 479 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
| |||
83 | 85 | | |
84 | 86 | | |
85 | 87 | | |
86 | | - | |
| 88 | + | |
87 | 89 | | |
88 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
89 | 112 | | |
90 | 113 | | |
91 | 114 | | |
| |||
0 commit comments