Ensure PCH is built and up-to-date by delegating to wasm_compile_pch.py. Returns: Exit code (0 = success)
(build_mode: str, verbose: bool = False)
| 321 | |
| 322 | |
| 323 | def ensure_pch_built(build_mode: str, verbose: bool = False) -> int: |
| 324 | """ |
| 325 | Ensure PCH is built and up-to-date by delegating to wasm_compile_pch.py. |
| 326 | |
| 327 | Returns: |
| 328 | Exit code (0 = success) |
| 329 | """ |
| 330 | print("Checking PCH status...") |
| 331 | |
| 332 | cmd = [ |
| 333 | "uv", |
| 334 | "run", |
| 335 | "python", |
| 336 | str(PCH_SCRIPT), |
| 337 | "--mode", |
| 338 | build_mode, |
| 339 | ] |
| 340 | |
| 341 | if verbose: |
| 342 | cmd.append("--verbose") |
| 343 | |
| 344 | result = subprocess.run(cmd, cwd=PROJECT_ROOT) |
| 345 | |
| 346 | if result.returncode != 0: |
| 347 | print(f"✗ PCH build/check failed with return code {result.returncode}") |
| 348 | return result.returncode |
| 349 | |
| 350 | return 0 |
| 351 | |
| 352 | |
| 353 | def ensure_unity_files_generated(unity_chunks: int, verbose: bool = False) -> int: |
no test coverage detected