From 8a754ee03371033d1ef3dbbd99140975d748d010 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=83=A1=E9=87=91=E6=88=90?= Date: Thu, 30 May 2024 21:20:34 +0800 Subject: [PATCH] !524 [build] Removed the condition that specifies clang binary on darwin to the stripped without -x argument, which will strip all symbols with no exception MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Issue: https://gitee.com/openharmony/third_party_llvm-project/issues/I9RYNA Signed-off-by: 胡金成 Change-Id: Id0a300388057733ae36cf5fc6171f2b0866540b7 --- llvm-build/build.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/llvm-build/build.py b/llvm-build/build.py index b378ac12cc9e..b51f02f1e553 100755 --- a/llvm-build/build.py +++ b/llvm-build/build.py @@ -2307,7 +2307,7 @@ class LlvmPackage(BuildUtils): self.install_mingw_python(install_dir) - def darwin_stripped_xargs(self, bin_dir, necessary_bin_files, script_bins, need_x_bins_darwin): + def darwin_stripped_xargs(self, bin_dir, necessary_bin_files, script_bins): for bin_filename in os.listdir(bin_dir): binary = os.path.join(bin_dir, bin_filename) if not os.path.isfile(binary): @@ -2315,7 +2315,7 @@ class LlvmPackage(BuildUtils): if bin_filename not in necessary_bin_files: os.remove(binary) elif bin_filename not in script_bins and self.build_config.strip: - if bin_filename not in need_x_bins_darwin and self.host_is_darwin(): + if self.host_is_darwin(): self.check_call(['strip', '-x', binary]) else: self.check_call(['strip', binary]) @@ -2697,10 +2697,9 @@ class LlvmPackage(BuildUtils): # Scripts that should not be stripped script_bins = ['git-clang-format', 'scan-build', 'scan-view'] - need_x_bins_darwin = ['clang', 'clang++', 'clang-9', 'clang-cl', 'clang-cpp'] - # Bin file in the list should be stripped with -x args when host=darwin - self.darwin_stripped_xargs(bin_dir, necessary_bin_files, script_bins, need_x_bins_darwin) + # Bin files should be stripped with -x args when host=darwin + self.darwin_stripped_xargs(bin_dir, necessary_bin_files, script_bins) # Strip lldb-server self.strip_lldb_server(host, install_dir) -- Gitee