MCPcopy Create free account
hub / github.com/FastLED/FastLED / ensure_pch_built

Function ensure_pch_built

ci/wasm_build_library.py:323–350  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

321
322
323def 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
353def ensure_unity_files_generated(unity_chunks: int, verbose: bool = False) -> int:

Callers 1

build_libraryFunction · 0.85

Calls 3

printFunction · 0.50
appendMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected