From 652465a0a0e5be93b2c5df56b3e92e6166b936bd Mon Sep 17 00:00:00 2001 From: Mike Gerwitz Date: Tue, 16 May 2017 10:54:05 -0400 Subject: [PATCH] tools/strip: Add utility --- src/current/compiler/js-calc.xsl | 4 ++-- src/current/compiler/js.xsl | 4 ++-- tools/strip | 11 +++++++++++ 3 files changed, 15 insertions(+), 4 deletions(-) create mode 100755 tools/strip diff --git a/src/current/compiler/js-calc.xsl b/src/current/compiler/js-calc.xsl index 515a3757..9195b2dc 100644 --- a/src/current/compiler/js-calc.xsl +++ b/src/current/compiler/js-calc.xsl @@ -93,11 +93,11 @@ ; - ( debug[' + /*!+*/( debug[' '] || ( debug[' - '] = [] ) ).push( result ); + '] = [] ) ).push( result );/*!-*/ return result; } )() diff --git a/src/current/compiler/js.xsl b/src/current/compiler/js.xsl index 273b6a3e..11f1e26b 100644 --- a/src/current/compiler/js.xsl +++ b/src/current/compiler/js.xsl @@ -918,11 +918,11 @@ ; - ( debug[' + /*!+*/( debug[' '] || ( debug[' - '] = [] ) ).push( tmp ); + '] = [] ) ).push( tmp );/*!-*/ result = diff --git a/tools/strip b/tools/strip new file mode 100755 index 00000000..4474e9fc --- /dev/null +++ b/tools/strip @@ -0,0 +1,11 @@ +#!/bin/bash +# +# Strip debugging information from object files and executables. +# +# Analogous to GNU strip used for ELF and other binary formats. +# Note that calculation breakdowns will not work after stripping. +## + +# debug assignments +sed -i 's#/\*!+\*/[^!]\+/\*!-\*/##g' ui/package.js +