<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - clang-cl asm output does not work with cc1as"
   href="https://bugs.llvm.org/show_bug.cgi?id=36676">36676</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang-cl asm output does not work with cc1as
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Frontend
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>nicolasweber@gmx.de
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>thakis@thakis:~/src/chrome/src$ cat test.cc
int printf(const char*, ...);
void f() {
  char buffer[20];
  printf(buffer);
}
thakis@thakis:~/src/chrome/src$
third_party/llvm-build/Release+Asserts/bin/clang-cl /TP /c test.cc /FA -m32 
test.asm:29:7: error: unknown token in expression
        call    @__security_check_cookie@4
                ^


/FA causes clang to not use the integrated assembler but instead to run a cc1as
pass on the generated .asm file -- and cc1as apparently doesn't like clang's
output.


I made /FA use intel assembly in r322652, which might be related.


clang-cl as far as I know doesn't have a flag like -S that means "only generate
assembly", it can only generate assembly as a side effect of compiling.


My motivation is to try and get whodis working with chrome/win translation
units in a cross build. whodis needs intel asm output. I'm trying to just tack
on '/FA /Z7 /Fafilename' to the compile command I get from the comp db, but hat
doesn't roundtrip. __security_check_cookie is one issue, another is `push
offset`:

/usr/local/google/home/thakis/src/chrome/src/out/gnwin/whodis.temp.asm:28933:14:
error: cannot use more than one symbol in memory operand
        push    offset "??_C@_02GFKOMOKH@?5?$CI?$AA@"
                       ^


I think these are the only two types of errors. So I suppose the fix is to
teach the assembly parser about these two constructs?</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>