This revision was automatically updated to reflect the committed changes.
Closed by commit rL284638: New clang option -mpie-copy-relocations to use copy
relocations for PIE builds. (authored by tmsriram).
Changed prior to commit:
https://reviews.llvm.org/D19996?vs=75189&id=75212#toc
Repository
tmsriram updated this revision to Diff 75189.
tmsriram added a comment.
- Fix Help text.
- Fix indentation.
https://reviews.llvm.org/D19996
Files:
include/clang/Driver/Options.td
include/clang/Frontend/CodeGenOptions.def
lib/CodeGen/BackendUtil.cpp
lib/Driver/Tools.cpp
lib/Frontend/Co
tmsriram added inline comments.
Comment at: lib/Frontend/CompilerInvocation.cpp:589
Args.hasArg(OPT_mincremental_linker_compatible);
+ Opts.PIECopyRelocations =
+ Args.hasArg(OPT_mpie_copy_relocations);
mgrang wrote:
> You should also check for the n
mgrang added inline comments.
Comment at: lib/Driver/Tools.cpp:4502
+ if (Args.hasFlag(options::OPT_mpie_copy_relocations,
options::OPT_mno_pie_copy_relocations,
+ false)) {
Please fix indentation.
Comment at: lib/Frontend
rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.
lgtm
Comment at: include/clang/Driver/Options.td:1696
+ Flags<[CC1Option]>,
+ HelpText<"Copy Relocations support for PIE builds">;
+def mno_pie_copy_relocations : Flag<["-"], "mn
tmsriram updated this revision to Diff 75179.
tmsriram added a comment.
- Changed help text to "Avail copy relocations support for PIE builds"
- Removed mno-pie... as a CC1 option
- Removed help text from mno-pie..
https://reviews.llvm.org/D19996
Files:
include/clang/Driver/Options.td
inclu
rnk added a comment.
In https://reviews.llvm.org/D19996#422906, @rafael wrote:
> Is there a gcc option or they just assume they are targeting the
> linker that was around when gcc was built?
IIRC there's no GCC option. They base their decision on the configure-time
check like you suggested.
tmsriram retitled this revision from "New clang option -mpiecopyrelocs to
indicate support for linker copy relocations when linking as PIE" to "New clang
option -mpie-copy-relocationss to indicate support for linker copy relocations
when linking as PIE".
tmsriram updated the summary for this rev