<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 - cc1as chokes on assembly from clang's `-S` option when WebAssembly is the target"
   href="https://bugs.llvm.org/show_bug.cgi?id=34544">34544</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>cc1as chokes on assembly from clang's `-S` option when WebAssembly is the target
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>Linux
          </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>Backend: WebAssembly
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>mvogelsang@rocketmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=19129" name="attach_19129" title="wasm-main.s">attachment 19129</a> <a href="attachment.cgi?id=19129&action=edit" title="wasm-main.s">[details]</a></span>
wasm-main.s

If we have the file `main.c` with the contents
'''
int main() { return 1; }
'''

and $CC is a clang built to target wasm32-unknown-unknown-wasm, we can produce
assembly with `$CC -S main.c`.
However, clang can't process the resulting main.s file, although it's contents
seem perfectly valid. Running `$CC main.s` results in
`clang -cc1as: error: unknown target triple 'wasm32-unknown-unknown-wasm',
please use -triple or -arch`

Doing the same process with a clang set to target aarch64-unknown-linux-gnu
results in perfectly fine code built for ARM. 

The relevant .s files are attached</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>