<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 27, 2016 at 8:05 AM, Rui Ueyama <span dir="ltr"><<a href="mailto:ruiu@google.com" target="_blank">ruiu@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr">We could add a "-lld-" prefix or something like that to new options that we add to LLD, but it reminds me of web browser developers who used to be habitually adding "-webkit-", "-moz-" or "-ms-" prefixes to new CSS properties. They've now reached the conclusion that that was not a good idea; until properties are standardized web developers had to list the same properties with all these different prefixes, and once they are standardized, they've got to add one more to the list without prefix. That was crazy.<div><br></div><div>CSS property names are different from command line options, but the situation is similar, so as long as a new option has a chance to make sense with other linkers, I think we should just give a generic name to the option.</div></div></blockquote><div><br></div><div>I agree. For something like --reproduce we don't want it to be --lld-reproduce (I was curious why you did that for /lldicf in COFF). But we do want some notion that options are marked hidden / experimental if we aren't really sure that we want to keep them long term. I think for --reproduce we are already pretty sure we want to keep it (but also it is very special in this regard because it is (hopefully) not an option that a user would pass as part of a real build). --lto-newpm-passes is a better example I think.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div><div><div class="gmail_extra"><br></div><div class="gmail_extra">I'm wondering why you think users shouldn't use --lto-newpm-passes or -mllvm. As long as they understand the risk of using it, that should be fine, no?</div></div></div></div></div></div></blockquote><div><br></div><div>Yes, that is the point. Generally we can't assume that they understand the risk (in fact, I'm sure that if you ask multiple developers, they may judge different options as being different risks).</div><div><br></div><div>Maybe we can have a very simple policy: if an option appears in --help then it is officially supported for compatibility. Otherwise, users should use it at their own risk. I believe that we are already mostly following this. We may need to mark some options with HelpHidden (<a href="https://github.com/llvm-mirror/llvm/blob/master/include/llvm/Option/OptParser.td#L57">https://github.com/llvm-mirror/llvm/blob/master/include/llvm/Option/OptParser.td#L57</a>) but that doesn't seem like a big deal.</div><div>We could also label some options with a group like this: <a href="https://github.com/llvm-mirror/clang/blob/master/include/clang/Driver/Options.td#L146">https://github.com/llvm-mirror/clang/blob/master/include/clang/Driver/Options.td#L146</a></div><div><br></div><div>-- Sean Silva</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><div><div><div><div><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 26, 2016 at 10:25 PM, Sean Silva <span dir="ltr"><<a href="mailto:chisophugis@gmail.com" target="_blank">chisophugis@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr">This is for compatibilty with gold. <a href="http://manpages.ubuntu.com/manpages/precise/man1/ld.1.html" target="_blank">http://manpages.ubuntu.com/manpages/precise/man1/ld.1.html</a><div><br></div><div>But this does point out something important: we don't have a clear delineation between options that are LLD-specific and ones that are for compatibility.</div><div><br></div><div>Rui, what do you think about adopting some convention about lld-specific options? Some of them are quite low level (like --lto-newpm-passes or -mllvm) and I don't think we want users to be relying on them. This is especially important as LLD is getting close to being let out in the wild in FreeBSD and users might start relying on the options.<span><font color="#888888"><div><br></div><div>-- Sean Silva</div></font></span></div></div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 26, 2016 at 10:01 PM, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr">Perhaps renaming it to --multithreaded? or --parallel? (or some toher similar name - perhaps there's precedent/inspiration in the existing flag name for similar behavior in other (LLVM or non-LLVM) tools?)</div><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 26, 2016 at 9:30 PM, Sean Silva via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">Author: silvas<br>
Date: Thu May 26 23:30:27 2016<br>
New Revision: 270963<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=270963&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=270963&view=rev</a><br>
Log:<br>
--threads is a flag, not a number<br>
<br>
We would previously accept `--threads=4`, but this option just turns on<br>
threading and does not specify a number of threads.<br>
<br>
I ran into this by accident because I was passing `--threads=<n>` but<br>
the number didn't seem to affect anything.<br>
<br>
Modified:<br>
    lld/trunk/ELF/Options.td<br>
<br>
Modified: lld/trunk/ELF/Options.td<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Options.td?rev=270963&r1=270962&r2=270963&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Options.td?rev=270963&r1=270962&r2=270963&view=diff</a><br>
==============================================================================<br>
--- lld/trunk/ELF/Options.td (original)<br>
+++ lld/trunk/ELF/Options.td Thu May 26 23:30:27 2016<br>
@@ -150,7 +150,7 @@ def strip_debug : Flag<["--"], "strip-de<br>
 def sysroot : Joined<["--"], "sysroot=">,<br>
   HelpText<"Set the system root">;<br>
<br>
-def threads : Joined<["--"], "threads">;<br>
+def threads : Flag<["--"], "threads">;<br>
<br>
 def trace: Flag<["--"], "trace">,<br>
   HelpText<"Print the names of the input files">;<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div></div></div></div></div></div></div></div>
</blockquote></div><br></div></div>