Chromium Code Reviews| Index: scripts/common/chromium_utils.py |
| diff --git a/scripts/common/chromium_utils.py b/scripts/common/chromium_utils.py |
| index 07b0d5d709541707ad680cd128052b8498469be2..c410a07295a350aeb86a8e405e013ab06206cb4b 100644 |
| --- a/scripts/common/chromium_utils.py |
| +++ b/scripts/common/chromium_utils.py |
| @@ -600,7 +600,7 @@ def CopyFileToDir(src_path, dest_dir, dest_fn=None, link_ok=False): |
| def MakeZip(output_dir, archive_name, file_list, file_relative_dir, |
| - raise_error=True, remove_archive_directory=True): |
| + raise_error=True, remove_archive_directory=True, strip_files = None): |
| """Packs files into a new zip archive. |
| Files are first copied into a directory within the output_dir named for |
| @@ -624,6 +624,7 @@ def MakeZip(output_dir, archive_name, file_list, file_relative_dir, |
| the list is not found. |
| remove_archive_directory: Whether to remove the archive staging directory |
| before copying files over to it. |
| + strip_files: List of executable files to strip symbols when zipping |
| Returns: |
| A tuple consisting of (archive_dir, zip_file_path), where archive_dir |
| @@ -671,8 +672,12 @@ def MakeZip(output_dir, archive_name, file_list, file_relative_dir, |
| dest_dir = os.path.join(archive_dir, dirname) |
| MaybeMakeDirectory(dest_dir) |
| CopyFileToDir(src_path, dest_dir, basename, link_ok=True) |
|
stgao
2016/07/11 19:04:27
As it is a link here, will we strip the original b
miimnk
2016/07/11 22:08:47
I checked and the original binary file in build di
|
| + if strip_files and basename in strip_files: |
| + os.system('strip %s' %(os.path.join(dest_dir, basename))) |
|
dimu1
2016/07/11 17:47:09
use RunCommand()
miimnk
2016/07/11 22:08:47
Done.
|
| else: |
| CopyFileToDir(src_path, archive_dir, basename, link_ok=True) |
| + if strip_files and basename in strip_files: |
| + os.system('strip %s' %(os.path.join(archive_dir, basename))) |
|
dimu1
2016/07/11 17:47:09
use RunCommand()
miimnk
2016/07/11 22:08:47
Done.
|
| except PathNotFound: |
| if raise_error: |
| raise |