Skip to content

Commit 4f6238a

Browse files
committed
Use all available cpu cores in iOS/OSX build procedure
1 parent 0457361 commit 4f6238a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

platforms/ios/build_framework.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"""
2929

3030
from __future__ import print_function
31-
import glob, re, os, os.path, shutil, string, sys, argparse, traceback
31+
import glob, re, os, os.path, shutil, string, sys, argparse, traceback, multiprocessing
3232
from subprocess import check_call, check_output, CalledProcessError
3333

3434
def execute(cmd, cwd = None):
@@ -166,7 +166,7 @@ def getBuildCommand(self, archs, target):
166166
"-sdk", target.lower(),
167167
"-configuration", "Release",
168168
"-parallelizeTargets",
169-
"-jobs", "4",
169+
"-jobs", multiprocessing.cpu_count(),
170170
] + (["-target","ALL_BUILD"] if self.dynamic else [])
171171

172172
return buildcmd

platforms/osx/build_framework.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"""
55

66
from __future__ import print_function
7-
import os, os.path, sys, argparse, traceback
7+
import os, os.path, sys, argparse, traceback, multiprocessing
88

99
# import common code
1010
sys.path.insert(0, os.path.abspath(os.path.abspath(os.path.dirname(__file__))+'/../ios'))
@@ -23,7 +23,7 @@ def getBuildCommand(self, archs, target):
2323
"-sdk", target.lower(),
2424
"-configuration", "Release",
2525
"-parallelizeTargets",
26-
"-jobs", "4"
26+
"-jobs", multiprocessing.cpu_count()
2727
]
2828
return buildcmd
2929

0 commit comments

Comments
 (0)