<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/54996>54996</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            clang -Wa,-MD,file.d option is not passed down to as subcommand
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          xclaesse
      </td>
    </tr>
</table>

<pre>
    What steps will reproduce the problem?
1. clang -Wa,-MD,foo.d file.S

What is the expected output?

Should compile and generate a depfile for assembly level include instructions, such as `.incbin "foo.bin"`.

What do you see instead?

clang: error: unsupported argument '-MD' to option 'Wa,'
clang: error: unsupported argument 'foo.d' to option 'Wa,'

What version of the product are you using? On what operating system?

clang version 10.0.0-4ubuntu1 
Target: x86_64-pc-linux-gnu

Please provide any additional information below.

The same command works fine with gcc.

This has been found while working on an issue reported against Meson: https://github.com/mesonbuild/meson/issues/9849. clang can generate depfile for preprocessor macros such as #include but not for assembly level includes.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyVU01v2zAM_TX2hYhhO3ZSH3zoVuRWbEAL9DjIEmN7kyVDH_n49yOdpu26osOQwJJs6vE98rGz6tw-DSKADzh7OI5ag8PZWRUlQhgQaN9pnJL1Lsnvkvy2yEBqYXpYPYmk_Lq6v6Pn3tpMwX7UmD1cwi7PBXr0CxCeZpQBFdgY5hheAC_Ph8FGrUDaaSYUEEZBjwadCHQAhTODw946EN7j1OkzaDyghtFIHRXS6oOLMozWeGIEPsqBYiHZ5BnFdKOBpCyZKG1px-__oqosnG0Ejxc8FOodzUV6sr4FdM463kTj4zxbx8qE6-OEJlCm7VKYLQQLdmZS_G6pGK3_i7WU9x9ob1Qc0HmOsftrB6mbgRBxURf9yHl38M3AkePtzHWml-DPJHr6SPMLaJFn9FtVsYsmxAIuMY9EFwNrON1sfmyq1SxXejTxtOpNfAv2XaPwC6fDqLjPZxBKjaxJcDOpw5NYFHao7fGPFj2SGC8mZJdM7JCjdb882c4gOTcM0Ev57gJ5byATdIiGzBP5zsBG4pssmPIIQw71Edn3z6XvBXcf7tFbw5qGEGZPm6Tc0b-nVLHLiAQdJo7p4qjV9UDrgkcu3DU3VXOdF0mJXiz91tDzMnASvafDJKSz_tW95fpq8C4GMDZ8MgM-S1W7Vs26EWkYg8b2g0nlGVVXF1F5GHJmPEXuPxq2mOD83XOR0-h0-0kBtD5clxXJ-Ekz_rYCddU0m3RopVg32xyx3G67XJTFvqiIp6zzomtqeVOlWlDDfZvUX2g4DR4vTeFBre_SsS3zssyrMi-KuqnrTOX5Ji8LWezFBuuySqocJzHqjHlk1vWpaxdKXew9fdSjD_71I-kde4O4pCN8EcNgXXuielEbMF1ytwv33_FBryk">