mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-13 21:35:39 +00:00
String libs before packaging xpis.
b = 88129 r = ssu sr = granrose
This commit is contained in:
parent
30e157f930
commit
3492c52688
@ -40,6 +40,40 @@
|
||||
|
||||
use Cwd;
|
||||
|
||||
##
|
||||
# RecursiveStrip
|
||||
#
|
||||
# Strips all libs by recursing into all directories and calling
|
||||
# the strip utility on all *.so files.
|
||||
#
|
||||
# @param targetDir the directory to traverse recursively
|
||||
#
|
||||
sub RecursiveStrip
|
||||
{
|
||||
my($targetDir) = $_[0];
|
||||
my(@dirEntries) = ();
|
||||
my($entry) = "";
|
||||
my($saveCwd) = cwd();
|
||||
|
||||
@dirEntries = <$targetDir/*>;
|
||||
|
||||
# strip all .so files in this dir
|
||||
chdir($targetDir); # push targetDir
|
||||
system("strip *.so >& /dev/null");
|
||||
chdir($saveCwd); # pop targetDir
|
||||
|
||||
# iterate over all subdir entries
|
||||
foreach $entry ( @dirEntries )
|
||||
{
|
||||
# if dir entry is dir
|
||||
if (-d $entry)
|
||||
{
|
||||
# recurse into subdir
|
||||
RecursiveStrip($entry);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Make sure there are at least three arguments
|
||||
if($#ARGV < 2)
|
||||
{
|
||||
@ -97,6 +131,10 @@ $saveCwdir = cwd();
|
||||
# unwanted path information.
|
||||
chdir("$inStagePath/$inComponentName");
|
||||
|
||||
# strip libs
|
||||
print "stripping libs in $inStagePath/$inComponentName...\n";
|
||||
RecursiveStrip(cwd());
|
||||
|
||||
system("zip -r $inDestPath/$inComponentName.xpi *");
|
||||
chdir("$saveCwdir");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user