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
This commit is contained in:
Mike Hommey 2017-03-14 15:22:39 +09:00
Родитель bae89898aa
Коммит 1b1fb10914
2 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -20,6 +20,8 @@ def main(args):
parser.add_argument("-C", metavar='DIR', default=".", parser.add_argument("-C", metavar='DIR', default=".",
help="Change to given directory before considering " help="Change to given directory before considering "
"other paths") "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("zip", help="Path to zip file to write")
parser.add_argument("input", nargs="+", parser.add_argument("input", nargs="+",
help="Path to files to add to zip") help="Path to files to add to zip")
@ -28,7 +30,7 @@ def main(args):
jarrer = Jarrer(optimize=False) jarrer = Jarrer(optimize=False)
with errors.accumulate(): with errors.accumulate():
finder = FileFinder(args.C) finder = FileFinder(args.C, find_executables=args.strip)
for path in args.input: for path in args.input:
for p, f in finder.find(path): for p, f in finder.find(path):
jarrer.add(p, f) jarrer.add(p, f)

Просмотреть файл

@ -76,7 +76,7 @@ ifdef WIN_UCRT_REDIST_DIR
JSSHELL_BINS += ucrtbase.dll JSSHELL_BINS += ucrtbase.dll
endif 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_DIR = $(topobjdir)/jarlog/
JARLOG_FILE_AB_CD = $(JARLOG_DIR)/$(AB_CD).log JARLOG_FILE_AB_CD = $(JARLOG_DIR)/$(AB_CD).log