diff --git a/llvm-build/build.py b/llvm-build/build.py index 3af3da30e7b10c1eea055683652ddc45c43a5bcb..978cf38a05e0730f1fa68e90becf8bd95b85666b 100755 --- a/llvm-build/build.py +++ b/llvm-build/build.py @@ -716,10 +716,10 @@ class LlvmCore(BuildUtils): target=build_target, install=install) if not install: - self.llvm_python_install(build_dir, install_dir) + self.llvm_install(build_dir, install_dir) - def llvm_python_install(self, build_dir, install_dir): - target_dirs = ["bin", "include", "lib", "python3", "libexec", "share"] + def llvm_install(self, build_dir, install_dir): + target_dirs = ["bin", "include", "lib", "libexec", "share"] for target_dir in target_dirs: target_dir = f"{build_dir}/{target_dir}" if not os.path.exists(target_dir): @@ -2760,6 +2760,13 @@ def main(): return if build_config.build_only: + sysroot_composer.setup_cmake_platform(llvm_install) + # temporary hide cmake checks for sdk-partly + lib_cmake = os.path.join(build_config.REPOROOT_DIR, 'prebuilts/clang/ohos', build_utils.use_platform(), + 'clang-%s' % build_config.CLANG_VERSION, "lib/cmake") + lib_cmake_tmp = f"{lib_cmake}_tmp" + shutil.move(lib_cmake, lib_cmake_tmp) + if "musl" in build_config.build_only_libs: # change compiller path to prebuilds in clang.gni file clang_gni = os.path.join(build_config.REPOROOT_DIR, "build", "config", "clang", "clang.gni") @@ -2787,6 +2794,8 @@ def main(): assert os.path.exists(os.path.join(build_config.REPOROOT_DIR, "out", "sysroot")), "Error! Libcxx require musl!" for (_, target) in configs: llvm_libs.build_libs_by_type(llvm_path, llvm_install, target, 'runtimes', False, False) + # return original lib/cmake dir + shutil.move(lib_cmake_tmp, lib_cmake) windows_python_builder = None