@ai-ecoverse/wasm-emscripten 6.0.9-5 → 6.0.9-7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -3
- package/bin/em++ +25 -7
- package/bin/em-config +25 -7
- package/bin/emar +25 -7
- package/bin/embuilder +25 -7
- package/bin/emcc +25 -7
- package/bin/emcmake +25 -7
- package/bin/emconfigure +25 -7
- package/bin/emmake +25 -7
- package/bin/emranlib +25 -7
- package/bin/emscan-deps +25 -7
- package/em++ +68 -0
- package/em-config +68 -0
- package/emar +68 -0
- package/embuilder +68 -0
- package/emcc +68 -0
- package/emcmake +68 -0
- package/emconfigure +68 -0
- package/emmake +68 -0
- package/emranlib +68 -0
- package/emscan-deps +68 -0
- package/emscripten-config +3 -2
- package/lib/slicc/slicc_exec.o +0 -0
- package/lib/slicc/slicc_fork.o +0 -0
- package/lib/slicc/slicc_jobs.o +0 -0
- package/lib/slicc/slicc_libc_gaps.o +0 -0
- package/lib/slicc/slicc_main_envp.o +0 -0
- package/lib/slicc/slicc_select.o +0 -0
- package/lib/slicc/slicc_signals.o +0 -0
- package/lib/slicc/slicc_spawn.o +0 -0
- package/package.json +15 -3
- package/tools/link.py +28 -8
- package/tools/utils.py +3 -1
package/emscripten-config
CHANGED
|
@@ -29,8 +29,9 @@ FROZEN_CACHE = False
|
|
|
29
29
|
# cannot reach Java.
|
|
30
30
|
# CLOSURE_COMPILER = None
|
|
31
31
|
|
|
32
|
-
#
|
|
33
|
-
|
|
32
|
+
# Default links inject homescoop_em_cli_ldflags + lib/slicc/*.o (see link.py).
|
|
33
|
+
# Do not set SLICC_VFS_PRE_JS here — that pre-js is node-realm only.
|
|
34
|
+
os.environ.setdefault('SLICC_EM_LIBDIR', str(_pkg / 'lib' / 'slicc'))
|
|
34
35
|
|
|
35
36
|
# Silence unused-import lint in some editors; keep roots discoverable.
|
|
36
37
|
_HOMESCOOP_CACHE_PKG = str(_cache_pkg)
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ai-ecoverse/wasm-emscripten",
|
|
3
|
-
"version": "6.0.9-
|
|
3
|
+
"version": "6.0.9-7",
|
|
4
4
|
"description": "Emscripten 6.0.9 for slicc (emcc via wasix-python)",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -22,6 +22,16 @@
|
|
|
22
22
|
"emscripten-config",
|
|
23
23
|
"bin",
|
|
24
24
|
"lib",
|
|
25
|
+
"emcc",
|
|
26
|
+
"em++",
|
|
27
|
+
"emar",
|
|
28
|
+
"emranlib",
|
|
29
|
+
"emcmake",
|
|
30
|
+
"emconfigure",
|
|
31
|
+
"emmake",
|
|
32
|
+
"embuilder",
|
|
33
|
+
"em-config",
|
|
34
|
+
"emscan-deps",
|
|
25
35
|
"*.py",
|
|
26
36
|
"tools",
|
|
27
37
|
"src",
|
|
@@ -45,7 +55,9 @@
|
|
|
45
55
|
"@ai-ecoverse/wasm-binaryen": "132.0.0-1",
|
|
46
56
|
"@ai-ecoverse/emscripten-cache": "6.0.9-2",
|
|
47
57
|
"esbuild-wasm": "0.28.2",
|
|
48
|
-
"typescript": "6.0.3"
|
|
58
|
+
"typescript": "6.0.3",
|
|
59
|
+
"acorn": "^8.18.0",
|
|
60
|
+
"acorn-import-phases": "^1.0.4"
|
|
49
61
|
},
|
|
50
62
|
"slicc": {
|
|
51
63
|
"abi": "emscripten",
|
|
@@ -55,7 +67,7 @@
|
|
|
55
67
|
"EM_CACHE_PACKAGE": "/shared/lib/node_modules/@ai-ecoverse/emscripten-cache",
|
|
56
68
|
"EM_LLVM_PACKAGE": "/shared/lib/node_modules/@ai-ecoverse/wasm-clang",
|
|
57
69
|
"EM_BINARYEN_PACKAGE": "/shared/lib/node_modules/@ai-ecoverse/wasm-binaryen",
|
|
58
|
-
"
|
|
70
|
+
"SLICC_EM_LIBDIR": "${package}/lib/slicc"
|
|
59
71
|
},
|
|
60
72
|
"commands": {
|
|
61
73
|
"emcc": {
|
package/tools/link.py
CHANGED
|
@@ -848,23 +848,43 @@ def phase_linker_setup(linker_args): # ruff: ignore[complex-structure, too-many
|
|
|
848
848
|
if not shared.SKIP_SUBPROCS:
|
|
849
849
|
shared.check_llvm_version()
|
|
850
850
|
|
|
851
|
-
#
|
|
852
|
-
#
|
|
853
|
-
# whose fs has no file descriptors. The pre-js mounts slicc's live VFS into
|
|
854
|
-
# the program's FS; it does nothing outside slicc.
|
|
851
|
+
# Optional node-realm VFS pre-js (explicit SLICC_VFS_PRE_JS only — do not
|
|
852
|
+
# default this; wasm-realm programs crash on process.env.SLICC_LIVE_FS).
|
|
855
853
|
slicc_pre_js = os.environ.get('SLICC_VFS_PRE_JS')
|
|
856
854
|
if slicc_pre_js and slicc_pre_js not in options.pre_js:
|
|
857
855
|
options.pre_js.append(slicc_pre_js)
|
|
858
|
-
# The pre-js holds main until the async VFS mount is done.
|
|
859
856
|
settings.DEFAULT_LIBRARY_FUNCS_TO_INCLUDE += ['$addRunDependency', '$removeRunDependency']
|
|
860
857
|
|
|
858
|
+
# Default: homescoop_em_cli_ldflags + libslicc objects so linked programs run
|
|
859
|
+
# in the wasm realm. Opt out with SLICC_EMCC_PLAIN=1 (plain web glue).
|
|
860
|
+
# Skip for -c (never reaches here), -r, -shared / SIDE_MODULE.
|
|
861
|
+
plain = os.environ.get('SLICC_EMCC_PLAIN', '').lower() in ('1', 'true', 'yes')
|
|
862
|
+
if (not plain and not options.shared and not options.relocatable
|
|
863
|
+
and not settings.SIDE_MODULE):
|
|
864
|
+
default_setting('ENVIRONMENT', ['web', 'worker', 'node'])
|
|
865
|
+
default_setting('EXIT_RUNTIME', 1)
|
|
866
|
+
default_setting('ALLOW_MEMORY_GROWTH', 1)
|
|
867
|
+
slicc_lib = os.environ.get('SLICC_EM_LIBDIR') or utils.path_from_root('lib', 'slicc')
|
|
868
|
+
# cli profile (not main_envp — that renames main→slicc_tool_main for make).
|
|
869
|
+
# slicc_main_envp.o / slicc_fork.o are shipped under lib/slicc/ for opt-in.
|
|
870
|
+
for obj in (
|
|
871
|
+
'slicc_spawn.o',
|
|
872
|
+
'slicc_exec.o',
|
|
873
|
+
'slicc_signals.o',
|
|
874
|
+
'slicc_select.o',
|
|
875
|
+
'slicc_libc_gaps.o',
|
|
876
|
+
'slicc_jobs.o',
|
|
877
|
+
):
|
|
878
|
+
path = os.path.join(slicc_lib, obj)
|
|
879
|
+
if os.path.isfile(path) and path not in linker_args:
|
|
880
|
+
linker_args.append(path)
|
|
881
|
+
|
|
861
882
|
autoconf = os.environ.get('EMMAKEN_JUST_CONFIGURE') or 'conftest.c' in options.input_files or 'conftest.cpp' in options.input_files
|
|
862
883
|
if autoconf:
|
|
863
884
|
# configure tests want a more shell-like style, where we emit return codes on exit()
|
|
864
885
|
settings.EXIT_RUNTIME = 1
|
|
865
|
-
#
|
|
866
|
-
|
|
867
|
-
if not slicc_pre_js:
|
|
886
|
+
# Host/plain node: NODERAWFS. Wasm-realm CLI defaults use the normal FS.
|
|
887
|
+
if not slicc_pre_js and plain:
|
|
868
888
|
settings.NODERAWFS = 1
|
|
869
889
|
# Add `#!` line to output JS and make it executable.
|
|
870
890
|
settings.EXECUTABLE = config.NODE_JS[0]
|
package/tools/utils.py
CHANGED
|
@@ -67,7 +67,9 @@ def exec(cmd):
|
|
|
67
67
|
else:
|
|
68
68
|
sys.stdout.flush()
|
|
69
69
|
sys.stderr.flush()
|
|
70
|
-
|
|
70
|
+
# wasix-python: execvp keeps the process's *initial* environ; execvpe with
|
|
71
|
+
# an explicit mapping passes updates from os.environ (emconfigure CC=…).
|
|
72
|
+
os.execvpe(cmd[0], cmd, os.environ)
|
|
71
73
|
|
|
72
74
|
|
|
73
75
|
def exit_with_error(msg, *args):
|