[PATCH] D18183: [ELF] - -pie/--pic-executable option implemented
Joerg Sonnenberger via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 16 18:28:49 PDT 2016
On Wed, Mar 16, 2016 at 02:28:01PM +0000, Rui Ueyama via llvm-commits wrote:
> ruiu added inline comments.
>
> ================
> Comment at: ELF/Driver.cpp:148-149
> @@ +147,4 @@
> + if (Config->Pie) {
> + if (Config->Shared)
> + error("-shared and -pie may not be used together");
> + if (Config->Static)
> ----------------
> I think this is also something that we are checking for errors too
> eagerly. -shared implies -pie, so they are not incompatible. It is
> better to ignore this combination.
As long as you are strictly using the clang/gcc driver, only one of
{-shared, pie} will happen. But people like to hand all kinds of random
junk via -Wl to detecting illogical combinations makes sense, especially
when it is almost free. As written by George, -shared does not imply
-pie.
Joerg
More information about the llvm-commits
mailing list