[PATCH] D64711: [LTO] Don't override relocation model stored in the module
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 16 23:33:53 PDT 2019
MaskRay added a comment.
I am with Peter. I don't know much about LTO but just wanted to say it is fairly common to compile with the less efficient -fPIC, and then link twice: -no-pie/-pie (executable) and -shared. A lot of linker optimizations (got->pcrel, TLS GD/LD->IE/LE, internalizing, etc) happen when you link -fPIC objects in the -no-pie/-pie way. Passing -mllvm -relocation-model explicitly to achieve your intended effect seems practical. It just should not be the default.
Repository:
rLLD LLVM Linker
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64711/new/
https://reviews.llvm.org/D64711
More information about the llvm-commits
mailing list