This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
shared libraries + lto ?
- From: Alain Meunier <deco33 at hotmail dot fr>
- To: "gcc-help at gcc dot gnu dot org" <gcc-help at gcc dot gnu dot org>
- Date: Fri, 1 Aug 2014 11:09:38 +0200
- Subject: shared libraries + lto ?
- Authentication-results: sourceware.org; auth=none
Hello,
I would like to know if one can use lto with shared libraries and leverage all the goodness of both worlds ?
My tests show that it works but not sure if lto brang something or not in the game.
gcc -O3 -shared -fPIC my_shared.c -o libmy_shared.so -lto
and linking
gcc -O3 my_app.c -o my_binary -lmy_shared -lto
I would like to keep the ability to have shared libraries. Will gcc make something out of it ?
Thanks