[PATCH] D33418: Support for taking the max of module flags when linking, use for PIE/PIC
Teresa Johnson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon May 22 13:15:05 PDT 2017
tejohnson created this revision.
Add Max ModFlagBehavior, which can be used to take the max of two
module flag values when merging modules. Use it for the PIE and PIC
levels.
This avoids an error when we try to import from a module built -fpic
into a module built -fPIC, for example. For both PIE and PIC levels,
this will be legal, since the code generation gets more conservative
as the level is increased. Therefore we can take the max instead of
somehow trying to block importing between modules compiled with
different levels.
https://reviews.llvm.org/D33418
Files:
include/llvm/IR/Module.h
lib/IR/Module.cpp
lib/IR/Verifier.cpp
lib/Linker/IRMover.cpp
test/Linker/Inputs/module-flags-pic-2-b.ll
test/Linker/module-flags-pic-2-a.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33418.99797.patch
Type: text/x-patch
Size: 4495 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170522/fe9ca567/attachment.bin>
More information about the llvm-commits
mailing list