diff options
author | Harmen Stoppels <harmenstoppels@gmail.com> | 2022-11-04 10:30:53 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-04 02:30:53 -0700 |
commit | 1d4919924de9743f7ec6f47616d2c67d3074648b (patch) | |
tree | a206d8a52f1f0057af7677c9d91bf34102239c7a /SECURITY.md | |
parent | b1f896e6c75560cdb4f315cd8e68a653d085db63 (diff) | |
download | spack-1d4919924de9743f7ec6f47616d2c67d3074648b.tar.gz spack-1d4919924de9743f7ec6f47616d2c67d3074648b.tar.bz2 spack-1d4919924de9743f7ec6f47616d2c67d3074648b.tar.xz spack-1d4919924de9743f7ec6f47616d2c67d3074648b.zip |
Add in-place RPATH replacement (#27610)
Whenever the rpath string actually _grows_, it falls back to patchelf,
when it stays the same length or gets shorter, we update it in-place,
padded with null bytes.
This PR only deals with absolute -> absolute rpath replacement. We don't
use `_build_tarball(relative=True)` in our CI. If `relative` then it falls
back to the old replacement code.
With this PR, relocation time goes down significantly, likely because patchelf
does some odd things with mmap, causing lots of overhead. Example:
- `binutils`: 700MB installed, goes from `1.91s` to `0.57s`, or `3.4x` faster.
Relocation time: 27% -> 10% of total install time
- `llvm`: 6.8GB installed, goes from `28.56s` to `5.38`, or `5.3x` faster.
Relocation time: 44% -> 13% of total install time
The bottleneck is now decompression.
Note: I'm somewhat confused about the "relative rpath" code paths. Right
now this PR only deals with absolute -> absolute replacement. As far as
I understand, if you embrace relative rpaths when uploading to the
buildcache, the whole point is you _don't_ want to patch rpaths on
install? So it seems fine to not expand `$ORIGIN` again imho.
Diffstat (limited to 'SECURITY.md')
0 files changed, 0 insertions, 0 deletions