diff --git a/llvm-build/build.py b/llvm-build/build.py index b378ac12cc9e3456b2a618af91291d1995306207..b51f02f1e5532756604eb444723c2c3769d00ce9 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)