diff options
author | Mike DePaulo <mikedep333@users.noreply.github.com> | 2017-07-07 23:17:52 -0400 |
---|---|---|
committer | Adam J. Stewart <ajstewart426@gmail.com> | 2017-07-07 22:17:52 -0500 |
commit | 72aa99cb245afa8c0b6a3cf6fb7dcc6b46dd5f03 (patch) | |
tree | aac3ce0b921117551ef2cec0228bc84d07a55a71 /var | |
parent | efecefd4dd2483b350b496e0c192772dbc992f92 (diff) | |
download | spack-72aa99cb245afa8c0b6a3cf6fb7dcc6b46dd5f03.tar.gz spack-72aa99cb245afa8c0b6a3cf6fb7dcc6b46dd5f03.tar.bz2 spack-72aa99cb245afa8c0b6a3cf6fb7dcc6b46dd5f03.tar.xz spack-72aa99cb245afa8c0b6a3cf6fb7dcc6b46dd5f03.zip |
GCC: Add strip variant to reduce installation size (#4670)
* gcc: Add strip variant
* gcc: Fix strip variant description being too long
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/gcc/package.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/gcc/package.py b/var/spack/repos/builtin/packages/gcc/package.py index b8d504a1d8..e9b9c93dd6 100644 --- a/var/spack/repos/builtin/packages/gcc/package.py +++ b/var/spack/repos/builtin/packages/gcc/package.py @@ -74,6 +74,9 @@ class Gcc(AutotoolsPackage): variant('piclibs', default=False, description='Build PIC versions of libgfortran.a and libstdc++.a') + variant('strip', + default=False, + description='Strip executables to reduce installation size') # https://gcc.gnu.org/install/prerequisites.html depends_on('gmp@4.3.2:') @@ -247,6 +250,12 @@ class Gcc(AutotoolsPackage): return [] @property + def install_targets(self): + if '+strip' in self.spec: + return ['install-strip'] + return ['install'] + + @property def spec_dir(self): # e.g. lib/gcc/x86_64-unknown-linux-gnu/4.9.2 spec_dir = glob.glob('{0}/gcc/*/*'.format(self.prefix.lib)) |