[PATCH] Start fleshing out the Darwin driver

Joe Ranieri joe at alacatialabs.com
Fri Aug 23 22:55:43 PDT 2013


On Thu, Aug 22, 2013 at 3:43 PM, Nick Kledzik <kledzik at apple.com> wrote:

> - How should the dylib compatibility and current version flags be stored?
> The minimum OS version is immediately validated outside of validateImpl and
> stored into a PackedVersion. There is no getter to access the exact value
> for that field, just the minOS helper.
>
> The client of these version fields is the mach-o writer which needs the
> 32-bit value to place into the mach-o data structures.  Therefore, the
> value should be stored in the context as a 32-bit value (not as a string).
>   What this means is that the step that gets the -current_version arg needs
> to validate (can be parsed into packed 32-bit value) and report error if
> not (instead of doing the checking in validateImp).  The PackedVersion
> inner class should probably be removed and add utility methods  to the
> MachOLinkingContext class to convert uint32_t <-> StringRef.
>

I was going to argue that validateImpl cares about whether or not the
string was specified or not, in order to issue the "you can't use
current_version with bundles" error. However, it appears clangDriver
actually takes care of issuing this error in 'darwin::Link::AddLinkArgs'.

Should lld error as well? Even though ld64 doesn't, it seems like lld
should...

-- Joe Ranieri
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130824/cf03a1b8/attachment.html>


More information about the llvm-commits mailing list