[PATCH] D59841: [Gnu Driver] Let -static-pie win if it is specified along with -pie or -static.
Siva Chandra via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue May 21 13:17:00 PDT 2019
sivachandra marked an inline comment as done.
sivachandra added a comment.
PTAL
================
Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:311
if (Args.hasArg(options::OPT_shared) || Args.hasArg(options::OPT_static) ||
- Args.hasArg(options::OPT_r))
+ Args.hasArg(options::OPT_r) || Args.hasArg(options::OPT_static_pie))
return false;
----------------
saugustine wrote:
> It's not clear to me that the command line -static-pie -no-pie should result in static-pie, given the way the rest of that function is coded.
>
> I might make it a ternary enum: "nothing" "pie" "static-pie" with the last one winning. That method seems more consistent with current behavior.
>
> This would allow anyone checking the state of pie to use a single function and just check the result.
static-pie is now handled in its own separate function below.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59841/new/
https://reviews.llvm.org/D59841
More information about the cfe-commits
mailing list