<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    On 3/5/2012 1:30 PM, Sean Silva wrote:
    <blockquote
cite="mid:CAHnXoamzBEQ0NVqJoU6UaHMZWykyUVPEkP1bvGy_FdSDZ+Z+kA@mail.gmail.com"
      type="cite">
      <div>Personally, I think that even with the gcc-like syntax, it is
        still too burdensome to pass args. `-fplugin-arg-plugin-bar=baz`
        is a lot of typing just for one arg. People just won't do that
        manually: they will write a script to do it for them. That
        suggests that the best plan of action would be to just write a
        simple python script that builds the command-line and execs
        clang with the right args.</div>
      <div><br>
      </div>
      <div>Usage would be:</div>
      <div>clang-plugin++ <span
style="background-color:rgb(255,255,255);font-family:arial,sans-serif;font-size:12px">../../Debug+Asserts/lib/</span><span
style="background-color:rgb(255,255,255);font-family:arial,sans-serif;font-size:12px">libPrintFunctionNames.so
          -w --mylongopt=foo --some-arg -- -O3 -c file.cc -Wall</span></div>
      <div><font face="arial, sans-serif">Any args after `--` are passed
          directly to clang as normal args.</font></div>
      <div><font face="arial, sans-serif"><br>
        </font></div>
      <div><font face="arial, sans-serif">This means that you can do
          `CXX=</font>clang-plugin++ /path/to/plugin.so<span
style="background-color:rgb(255,255,255);font-size:12px;font-family:arial,sans-serif"> --foo
          -q --` in a makefile and it will Just Work. It also adds a
          useful layer of indirection which allows for more flexibility
          in changing how clang actually processes the args.</span></div>
      <br>
    </blockquote>
    My expectation is that most uses of plugins would not be one-off
    invocations but rather a verbose export CC/CXX setting prior to
    configure or via settings done in a Makefile like so:
<a class="moz-txt-link-rfc2396E" href="http://hg.mozilla.org/mozilla-central/file/tip/config/static-checking-config.mk"><http://hg.mozilla.org/mozilla-central/file/tip/config/static-checking-config.mk></a>.<br>
    <pre class="moz-signature" cols="72">-- 
Joshua Cranmer
News submodule owner
DXR coauthor</pre>
  </body>
</html>