diff options
Diffstat (limited to 'treeshake_all')
-rwxr-xr-x | treeshake_all | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/treeshake_all b/treeshake_all deleted file mode 100755 index 8ebf51d0..00000000 --- a/treeshake_all +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/sh -# Build minimal-size versions of all apps. -# Hacky; only intended for some stats at the moment. - -set -e -cd `dirname $0` - -./build - -export OS=${OS:-linux} - -echo "== deleting dead code" -for app in factorial crenshaw2-1 crenshaw2-1b handle hex survey pack dquotes assort tests sigils calls braces -do - echo $app - ./treeshake_translate init.$OS 0*.subx apps/subx-params.subx apps/$app.subx 2> apps/$app.stderr - mv a.in apps/$app.in - mv a.treeshake apps/$app.treeshake - echo "LoC `cat apps/$app.subx |wc -l` => `grep -vh '^\s*$\|^\s*#' apps/$app.subx |./treeshake |wc -l`" - echo "LoC including common libraries: `cat apps/$app.in |wc -l` => `cat apps/$app.treeshake |wc -l`" - mv a.elf apps/$app.treeshake.bin - echo "binary size: `ls -lh apps/$app |column 5` => `ls -lh apps/$app.treeshake.bin |column 5`" -done - -echo "== testing treeshaken binaries" -for app in factorial crenshaw2-1 crenshaw2-1b -do - echo $app - ./treeshake_ntranslate init.$OS 0*.subx apps/$app.subx - diff apps/$app a.elf -done - -for app in hex survey pack assort dquotes tests sigils calls braces -do - echo $app - ./treeshake_ntranslate init.$OS 0*.subx apps/subx-params.subx apps/$app.subx - diff apps/$app a.elf -done - -echo mu.subx -./treeshake_ntranslate init.$OS 0*.subx apps/mu.subx -diff apps/mu a.elf |