param([string]$Python = 'python', [string]$Lwasm, [string]$Output) $ErrorActionPreference = 'Stop' $root = Split-Path -Parent $PSScriptRoot $arguments = @('-X','utf8','-B',(Join-Path $root 'tools/build_roms.py')) if ($Lwasm) { $arguments += @('--lwasm',$Lwasm) } if ($Output) { $arguments += @('--output',$Output) } & $Python @arguments if ($LASTEXITCODE -ne 0) { throw 'ROM assembly/identity verification failed.' }