From 148b26cba3439a8d8e1a9746c89af9c0e766cd70 Mon Sep 17 00:00:00 2001 From: likholatovevgeny Date: Mon, 6 May 2024 16:28:55 +0300 Subject: [PATCH] Fixed copying for partly build. Signed-off-by: likholatovevgeny --- llvm-build/build.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/llvm-build/build.py b/llvm-build/build.py index 944f27f9ebd1..6e1574f9083c 100755 --- a/llvm-build/build.py +++ b/llvm-build/build.py @@ -717,13 +717,14 @@ class LlvmCore(BuildUtils): for (src_path, dirs, files) in os.walk(target_dir): dst_path = src_path.replace(build_dir, install_dir) for file in files: - if file.endswith(".cpp.o") or file == "cmake_install.cmake": - continue src = os.path.join(src_path, file) dst = os.path.join(dst_path, file) - if os.stat(src) != os.stat(dst): - os.makedirs(dst_path, exist_ok=True) - shutil.copy2(src, dst) + if file.endswith(".cpp.o") or file == "cmake_install.cmake": + continue + if os.path.exists(dst) and os.stat(src) == os.stat(dst): + continue + os.makedirs(dst_path, exist_ok=True) + shutil.copy2(src, dst) def llvm_compile_darwin_defines(self, llvm_defines): if self.host_is_darwin(): -- Gitee