<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/57136>57136</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
clang-cl does not recognize /external:W
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
CAD97
</td>
</tr>
</table>
<pre>
I tried building my Visual Studio project using:
```
msbuild /p:ClToolExe=clang-cl.exe /p:ClToolPath=$((gcm clang-cl).Path | Split-Path -Parent)
```
The build failed with clang-cl mistaking the `/external` flag as a filename:
```
clang-cl : error : no such file or directory: '/external:W3' [D:\git\cad97\kdlxx\examples\mini.vcxproj]
```
Per [the docs](https://clang.llvm.org/docs/UsersManual.html#id10), I'm filing an issue for the valid cl.exe flag that clang-cl does not understand.
```
> cl /? | Select-String "/external"
/external:I <path> - location of external headers
/external:env:<var> - environment variable with locations of external headers
/external:anglebrackets - treat all headers included via <> as external
/external:W<n> - warning level for external headers
/external:templates[-] - evaluate warning level across template instantiation chain
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyNVE1v4yAQ_TX2BcVyTJw4Bx_apJF6WGml7sd5DBObLYYIcJrur9-BNNl2t6pqWdgww5uZNw86K5_bexacQsm6SWmpTM_GZ_ZD-Qk0ewiTVJYdnP2FIrDJkznjN1m5zcrLuCxf3jQdfYJhWbU7kOdGf7NW350w41uhwfQzoQs84Vv7VwgDOWTVIqsaensxsot3Vq2LaGfZasMeDlqFWZrS6NAEMr-bx3n8NuC5LLYHpanGJ0VbL9BsVD7AYyw5kGPcW-3wFNAZ0DRjew09A8-A7Wm3gRE_Lv4KTG4MnbMu_RnL_CSGBMJoTSpHbFr3HI1ZtXodld_85LTEsvp2G4PVm14FGgXI9Yq-j1KfTvTFE4wHjZ5-R2VUcRSn2KWs3n5Ax1d0ETgWK63w0blqhhAOPoaqdvSmEgqtj2NhXU8LybHafffo_BcwpIpiCCO1hSs5LyP91YbdU8pjrC9yCYYp7ydke6o1xjqCVpK9ND5xGgYIf9sgLXoiifRlJEUJYGTxAcsZv2ORY8qX786yQE2Ezh5IxxQ_q6rXjNLsNdYbru-pP5tDUt8dS8-MaSsgKGuY3bOLKxsQYmrvYaA5Rvb45gjuAjNjtKqcNSNJlOp3CjrqfVLfBd9_NgCxpLFzIB4xeIIODok90NdNTBmhJ0nyPiqIFcU0SLZXjHdAf5KbuVZ9zvkJnIkEajyiTt37THoBSYgQohRvZySpVD21fKK1fyBBOOs9u-ygvGOzgzrzLQZQ5p-O59jOl8tyUc4bvs5ly-WaryEPKmhs_xcQnSvbG_U73S-vq80np9u3SqdzNUxdIexIkyj4l8_s5bajaZJxVH-9mvNlPlD4psKuFqu1RA5N18i64lwusRZ1idjkGjrUviUqSHcGn84nIWqw3uaqrcqqKps5ny8WvG4K0ZSLDpZz7HjZlcCzRYkjXVTX85e7NqXUTb0no6b7yv81gveqN4gpHOHDFAbr2s3Ndr3KU-A2Jf4HNvfXQw">