[LLVMdev] Darwin option processing
Mike Stump
mrs at apple.com
Fri May 8 13:49:35 PDT 2009
On May 8, 2009, at 1:02 PM, Chris Lattner wrote:
> This goes against our general direction for llvm libraries: they
> should generally all be built pic.
After reviewing yet more of the Makefile,rules file, I believe
ENABLE_PIC is the right thing to check. Currently ENABLE_PIC has to
be set to get shared bits built, if the user wants them. Given that,
we can use that to control wether or not -mdynamic-no-pic is added.
Because this _must_ be set, it is safe to use the setting of that flag
to make the decision on wether to add -mdynamic-no-pic. If that flag
isn't set, the resulting objects, in general, can't be used in a
shared library.
> This is because we don't know how they will be linked in.
Currently, the Makefile does know how the object will be used. On
darwin, -fno-common is only added when ENABLE_PIC is 1, and objects
can't be used in a shared library unless -fno-common is added.
More information about the llvm-dev
mailing list