We always pick the smallest. I think the ordering is Small < Default < Large, but I might have gotten that wrong, so .. comments welcome.
This fixes an LTO issue found while linking the FreeBSD base system.
Details
Details
- Reviewers
• rafael
Diff Detail
Diff Detail
Event Timeline
Comment Actions
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.
lib/IR/Module.cpp | ||
---|---|---|
497 | Not sure if Warning is correct. Maybe we need a "custom" or "minimum"? |
Not sure if Warning is correct.
Maybe we need a "custom" or "minimum"?