[PATCH] D21100: [Linker/Mover] Implement merging of PIC flags
Rafael Ávila de Espíndola via llvm-commits
llvm-commits at lists.llvm.org
Sat Jun 11 10:47:56 PDT 2016
rafael added a comment.
Sorry, but I think you hit an area that needs quite a bit of redesign :-(
We have Reloc::Model, PICLevel and PIELevel.
Medium term I would like to have have the "assumeDsoLocalBit" in each GV. With that we would need only one pic level of NotPic, SmallPic or BigPIc.
For a shorter term I think what we can do is:
- Change Reloc::Model to Static, PIC_, DynamicNoPIC, PIE.
- Delete PIELevel.
- Change PICLevel to just NotPIC, SmallPIC, BigPic
Right now we cannot really merge because "Default" means different things to different things to different targets.
I would suggest starting by changing PicLevel. After that we can change Reloc::Model and drop PIELevel.
================
Comment at: lib/IR/Module.cpp:497
@@ -496,3 +496,3 @@
void Module::setPICLevel(PICLevel::Level PL) {
- addModuleFlag(ModFlagBehavior::Error, "PIC Level", PL);
+ addModuleFlag(ModFlagBehavior::Warning, "PIC Level", PL);
}
----------------
Not sure if Warning is correct.
Maybe we need a "custom" or "minimum"?
http://reviews.llvm.org/D21100
More information about the llvm-commits
mailing list