From 1b1fb109146299ee3e8369cadf63303aa998667c Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Tue, 14 Mar 2017 15:22:39 +0900 Subject: [PATCH] Bug 1346381 - Strip executables in the jsshell package. r=mshal In bug 1335309, FileFinder was made to default to not find executables, and zip.py was made to use the default instead. Which made sense for most uses of zip.py, except for the jsshell package. So we add a flag to make zip.py able to strip executable (which happens when the FileFinder is made to find them), and use that flag for the jsshell package only. --HG-- extra : rebase_source : 0202f9acd5e6175d3790aaef026e18c6913cf0c6 --- python/mozbuild/mozbuild/action/zip.py | 4 +++- toolkit/mozapps/installer/upload-files.mk | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/python/mozbuild/mozbuild/action/zip.py b/python/mozbuild/mozbuild/action/zip.py index 143d7766e6c0..3d774b46a56f 100644 --- a/python/mozbuild/mozbuild/action/zip.py +++ b/python/mozbuild/mozbuild/action/zip.py @@ -20,6 +20,8 @@ def main(args): parser.add_argument("-C", metavar='DIR', default=".", help="Change to given directory before considering " "other paths") + parser.add_argument("--strip", action='store_true', + help="Strip executables") parser.add_argument("zip", help="Path to zip file to write") parser.add_argument("input", nargs="+", help="Path to files to add to zip") @@ -28,7 +30,7 @@ def main(args): jarrer = Jarrer(optimize=False) with errors.accumulate(): - finder = FileFinder(args.C) + finder = FileFinder(args.C, find_executables=args.strip) for path in args.input: for p, f in finder.find(path): jarrer.add(p, f) diff --git a/toolkit/mozapps/installer/upload-files.mk b/toolkit/mozapps/installer/upload-files.mk index 6e776769959a..0482e13ea186 100644 --- a/toolkit/mozapps/installer/upload-files.mk +++ b/toolkit/mozapps/installer/upload-files.mk @@ -76,7 +76,7 @@ ifdef WIN_UCRT_REDIST_DIR JSSHELL_BINS += ucrtbase.dll endif -MAKE_JSSHELL = $(call py_action,zip,-C $(DIST)/bin $(abspath $(PKG_JSSHELL)) $(JSSHELL_BINS)) +MAKE_JSSHELL = $(call py_action,zip,-C $(DIST)/bin --strip $(abspath $(PKG_JSSHELL)) $(JSSHELL_BINS)) JARLOG_DIR = $(topobjdir)/jarlog/ JARLOG_FILE_AB_CD = $(JARLOG_DIR)/$(AB_CD).log