<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Aug 22, 2013 at 3:43 PM, Nick Kledzik <span dir="ltr"><<a href="mailto:kledzik@apple.com" target="_blank">kledzik@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div class="im"><blockquote type="cite" dir="auto">
<div style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">
<div dir="ltr"><div>- 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.</div>
</div></div></blockquote></div><div>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.</div>
</div></div></blockquote><div><br></div><div style>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'.</div>
<div style><br></div><div style>Should lld error as well? Even though ld64 doesn't, it seems like lld should...</div><div style><br></div><div style>-- Joe Ranieri</div></div></div></div>