按提示词结论统一 wasm 源集依据锁

This commit is contained in:
cnc
2026-06-02 13:58:02 +08:00
parent 67154a70fa
commit ce0605d20d
4 changed files with 25 additions and 11 deletions

View File

@@ -6,8 +6,9 @@ cd "$(dirname "$0")"
# LinuxCNC source basis: object probes compile the core entries selected from
# linuxcnc-rs274-wasm-source-files.txt, including src/emc/rs274ngc,
# src/emc/tooldata/tooldata_common.cc, src/emc/ini/inifile.cc, and
# src/emc/nml_intf/emcops.cc, together with wasm-safe shims that replace the
# manifest's blocked Python, dlopen, tooldata mmap, HAL, and runtime edges.
# src/emc/nml_intf/emcops.cc, together with CMake-listed wasm-safe project
# bridge sources and shims that replace the manifest's blocked Python, dlopen,
# tooldata mmap, HAL, and runtime edges.
usage() {
echo "usage: $0 --mode source-objects|rs274ngc-pre|runtime [manifest]" >&2
}
@@ -99,6 +100,9 @@ case "$mode" in
;;
esac
grep -F 'LinuxCNC source basis: wasm-safe project probe sources are the thin bridge' list-linuxcnc-wasm-safe-project-sources.sh >/dev/null
grep -F 'LinuxCNC source basis: wasm-safe shim probe sources are limited to the' list-linuxcnc-wasm-safe-shims.sh >/dev/null
sources=()
shim_output=$(./list-linuxcnc-wasm-safe-shims.sh)
mapfile -t shim_sources <<<"$shim_output"
@@ -106,21 +110,13 @@ sources+=("${shim_sources[@]}")
case "$mode" in
source-objects)
;;
rs274ngc-pre)
rs274ngc-pre|runtime)
project_source_output=$(./list-linuxcnc-wasm-safe-project-sources.sh)
if [[ -n "$project_source_output" ]]; then
mapfile -t project_sources <<<"$project_source_output"
sources+=("${project_sources[@]}")
fi
;;
runtime)
core_source_output=$(./list-cmake-set-sources.sh cnc_sim_core_sources core/)
mapfile -t core_sources <<<"$core_source_output"
sources+=("${core_sources[@]}")
backend_source_output=$(./list-cmake-set-sources.sh cnc_sim_linuxcnc_rs274_backend_sources core/)
mapfile -t backend_sources <<<"$backend_source_output"
sources+=("${backend_sources[@]}")
;;
esac
source_output=$(CNC_SIM_PREFLIGHT_CACHE_DIR="$preflight_cache_dir" LINUXCNC_ROOT="$linuxcnc_root" ./list-linuxcnc-wasm-manifest-sources.sh "$manifest" core full)
mapfile -t linuxcnc_sources <<<"$source_output"