fix gcc LTO (#1562)

I discovered this when trying to run clippy on a crate where a dependency
(In my case clippy) has LTO enabled.
/usr/lib only has a symlink to to lto plugin which resides in /usr/libexec:
https://pkgs.alpinelinux.org/contents?file=liblto_plugin.so&path=&name=gcc&branch=v3.13&repo=main&arch=x86_64

Previously, compilation failed with the following message:
  = note: cc: fatal error: '-fuse-linker-plugin', but liblto_plugin.so not found
          compilation terminated.

Co-authored-by: Michael Zimmermann <michael.zimmermann@grandcentrix.net>
This commit is contained in:
Michael Zimmermann 2021-05-19 20:03:59 +02:00 committed by GitHub
parent 49eba1b541
commit 866b5af051
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -371,6 +371,7 @@ COPY --from=base_image /usr/local/bin/ /usr/local/bin/
COPY --from=base_image /usr/local/lib/ /usr/local/lib/
COPY --from=base_image /usr/local/share/ /usr/local/share/
COPY --from=base_image /usr/lib/ /usr/lib/
COPY --from=base_image /usr/libexec/ /usr/libexec/
COPY --from=base_image /usr/share/ /usr/share/
COPY --from=base_image /usr/include/ /usr/include/
COPY --from=base_image /lib/ /lib/