<div dir="ltr">Hi all,<div><br></div><div>I've been making some additional tests for llvm-ar recently and was surprised by the behaviour regarding which archive format to output when the --format argument hasn't been used. </div><div><br></div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>From 273373:</div><div><br></div><div>Try to be more clever about selecting the default format.  When an existing</div><div>archive is used, use the type of the archive to determine the format.  When</div><div>existing members are present, use the first member's format to determine the</div><div>format to use.  If we are creating an empty archive (MRI mode) or are adding</div><div>non-object members, default to the current behaviour of using the host type due</div><div>to the lack of a better alternative.  This aids in cross-compilation on Darwin</div><div>to non-Darwin platforms which rely on GNU format archives.</div></blockquote><div><br></div><div>This doesn't seem ideal to me, particularly the use of the first member to decide format as this is not obvious from a user perspective. Would it be better to just default to host type or treat them as separate tools and decide default format by tool name?</div><div><br></div><div>Thanks,</div><div><br></div><div>Owen</div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div>