diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2013-02-10 21:26:27 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2013-02-10 21:26:27 +0200 |
commit | 26ff3fa23e07f8c4409675d52e30eeef11b63a66 (patch) | |
tree | a07221915b94801e08a01c5508e2fdd52a8e72b7 /builder_install.py | |
parent | 75dbc2abdb4103a59a7b348b29fc5b48da7e9012 (diff) | |
download | meson-26ff3fa23e07f8c4409675d52e30eeef11b63a66.zip meson-26ff3fa23e07f8c4409675d52e30eeef11b63a66.tar.gz meson-26ff3fa23e07f8c4409675d52e30eeef11b63a66.tar.bz2 |
Strip on install and generate pch properly.
Diffstat (limited to 'builder_install.py')
-rwxr-xr-x | builder_install.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/builder_install.py b/builder_install.py index 9df5612..5f9722d 100755 --- a/builder_install.py +++ b/builder_install.py @@ -74,10 +74,20 @@ def install_targets(d): fname = os.path.split(fullfilename)[1] aliases = t[2] outname = os.path.join(outdir, fname) + should_strip = t[3] print('Installing %s to %s' % (fname, outdir)) os.makedirs(outdir, exist_ok=True) shutil.copyfile(fullfilename, outname) shutil.copystat(fullfilename, outname) + if should_strip: + print('Stripping target') + ps = subprocess.Popen(['strip', outname], stdout=subprocess.PIPE, stderr=subprocess.PIPE) + (stdo, stde) = ps.communicate() + if ps.returncode != 0: + print('Could not strip file.\n') + print('Stdout:\n%s\n' % stdo.decode()) + print('Stderr:\n%s\n' % stde.decode()) + sys.exit(1) for alias in aliases: os.symlink(fname, os.path.join(outdir, alias)) p = subprocess.Popen([d.depfixer, outname, d.dep_prefix], stdout=subprocess.PIPE, |