mirror of
				https://github.com/browseros-ai/BrowserOS.git
				synced 2025-07-21 00:21:28 +03:00 
			
		
		
		
	On macOS, doesn't support -j core count
This commit is contained in:
		| @@ -9,7 +9,7 @@ import shutil | ||||
| import multiprocessing | ||||
| from pathlib import Path | ||||
| from context import BuildContext | ||||
| from utils import run_command, log_info, log_success, log_warning, join_paths, IS_WINDOWS | ||||
| from utils import run_command, log_info, log_success, log_warning, join_paths, IS_WINDOWS, IS_MACOS | ||||
|  | ||||
|  | ||||
| def build(ctx: BuildContext) -> bool: | ||||
| @@ -44,6 +44,10 @@ def build(ctx: BuildContext) -> bool: | ||||
|     # Try to detect CPU cores and optimize parallel jobs | ||||
|     autoninja_cmd = "autoninja.bat" if IS_WINDOWS else "autoninja" | ||||
|     try: | ||||
|         if IS_MACOS: | ||||
|             log_info("On macOS, using default autoninja parallelism") | ||||
|             run_command([autoninja_cmd, "-C", ctx.out_dir, "chrome", "chromedriver"]) | ||||
|         else: | ||||
|             cpu_count = multiprocessing.cpu_count() | ||||
|             parallel_jobs = cpu_count | ||||
|             log_info(f"🖥️  Detected {cpu_count} CPU cores, using {parallel_jobs} parallel jobs") | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Nikhil Sonti
					Nikhil Sonti