build_llvm.py: Speed up llvm build with multi procs on windows (#3512)
This commit is contained in:
@ -156,11 +156,15 @@ def build_llvm(llvm_dir, platform, backends, projects, use_clang=False, extra_fl
|
||||
CONFIG_CMD += " -A x64"
|
||||
else:
|
||||
CONFIG_CMD += " -G'Ninja'"
|
||||
print(f"Config command: {CONFIG_CMD}")
|
||||
subprocess.check_call(shlex.split(CONFIG_CMD), cwd=build_dir)
|
||||
|
||||
BUILD_CMD = "cmake --build . --target package" + (
|
||||
" --config Release" if "windows" == platform else ""
|
||||
)
|
||||
if "windows" == platform:
|
||||
BUILD_CMD += " --parallel " + str(os.cpu_count())
|
||||
print(f"Build command: {BUILD_CMD}")
|
||||
subprocess.check_call(shlex.split(BUILD_CMD), cwd=build_dir)
|
||||
|
||||
return build_dir
|
||||
|
||||
Reference in New Issue
Block a user