Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions Tools/wasm/wasm_assets.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,14 +165,13 @@ def detect_extension_modules(args: argparse.Namespace):
loc = {}
exec(data, globals(), loc)

for name, value in loc["build_time_vars"].items():
if value not in {"yes", "missing", "disabled", "n/a"}:
for key, value in loc["build_time_vars"].items():
if not key.startswith("MODULE_") or not key.endswith("_STATE"):
continue
if not name.startswith("MODULE_"):
continue
if name.endswith(("_CFLAGS", "_DEPS", "_LDFLAGS")):
continue
modname = name.removeprefix("MODULE_").lower()
if value not in {"yes", "disabled", "missing", "n/a"}:
raise ValueError(f"Unsupported value '{value}' for {key}")

modname = key[7:-6].lower()
if modname not in modules:
modules[modname] = value == "yes"
return modules
Expand Down