Get emscripten compiler version string.
(emcc: str)
| 56 | |
| 57 | |
| 58 | def get_compiler_version(emcc: str) -> str: |
| 59 | """Get emscripten compiler version string.""" |
| 60 | try: |
| 61 | result = subprocess.run( |
| 62 | [emcc, "--version"], |
| 63 | capture_output=True, |
| 64 | text=True, |
| 65 | check=True, |
| 66 | timeout=10, |
| 67 | ) |
| 68 | # Return first line which contains version info |
| 69 | return result.stdout.split("\n")[0].strip() |
| 70 | except KeyboardInterrupt as ki: |
| 71 | handle_keyboard_interrupt(ki) |
| 72 | raise |
| 73 | except Exception as e: |
| 74 | print(f"Warning: Could not get compiler version: {e}") |
| 75 | return "unknown" |
| 76 | |
| 77 | |
| 78 | def compute_content_hash(file_path: Path) -> str: |
no test coverage detected