From 1434c45283fcd1f47418a2f71b2acca19f117328 Mon Sep 17 00:00:00 2001 From: Wenyong Huang Date: Thu, 13 Jun 2024 17:18:21 +0800 Subject: [PATCH] build_llvm.py: Speed up llvm build with multi procs on windows (#3512) --- ATTRIBUTIONS.md | 2 +- build-scripts/build_llvm.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ATTRIBUTIONS.md b/ATTRIBUTIONS.md index 3a4afa0d..b6e556d2 100644 --- a/ATTRIBUTIONS.md +++ b/ATTRIBUTIONS.md @@ -18,7 +18,7 @@ WAMR project reused some components from other open source project: - **NuttX ELF headers**: used in core/iwasm/aot/debug/elf_parser.c - **Dhrystone**: for the test benchmakr dhrystone -The WAMR fast interpreter is a clean room development. We would acknowledge the inspirations by [WASM3](https://github.com/wasm3/wasm3) open source project for the approach of pre-calculated oprand stack location. +The WAMR fast interpreter is a clean room development. We would acknowledge the inspirations by [WASM3](https://github.com/wasm3/wasm3) open source project for the approach of pre-calculated operand stack location. | third party components | version number | latest release | vendor pages | CVE details | | --- | --- | --- | --- | --- | diff --git a/build-scripts/build_llvm.py b/build-scripts/build_llvm.py index 0bc0ef7a..40765d0f 100755 --- a/build-scripts/build_llvm.py +++ b/build-scripts/build_llvm.py @@ -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