title: What is the official way to access the Visual Studio 2019 version of clang from the command prompt?
body: <p>I am trying to access the Visual Studio 2019 version of clang from the command prompt. I am looking for the <strong>official</strong> way to do this. So far it doesn't appear to be documented in any of <a href="https://devblogs.microsoft.com/cppblog/category/clang/" rel="noreferrer">the MSVC/clang blog posts</a>. (Please note that I am <em>not</em> looking for other ways to build/install clang on Windows. This question specifically relates to the VS2019 clang component.)</p>
  
  <p>Using the Visual Studio Installer, I have installed Visual Studio 2019 Professional (version 16.4.1) along with the optional "C++ Clang tools for Windows (9.0.0 - x64/x86)". The clang toolchain appears to be installed at:</p>
  
  <p><code>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\Llvm\bin</code></p>
  
  <p>(Perhaps I could add this directory to PATH, but this is not robust. Nor could I find this approach documented in any of Microsoft's docs.)</p>
  
  <p>My final goal is to use <code>clang-cl</code> with scons. But as a first step, I would like to be able to run <code>clang-cl</code> from the command prompt.</p>
  
  <p>When I run <code>vcvarsall.bat</code> none of the clang tools are available at the command prompt:</p>
  
  <pre><code>C:\Users\Ross&gt;"C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Auxiliary\Build\vcvarsall.bat" x64
  **********************************************************************
  ** Visual Studio 2019 Developer Command Prompt v16.4.1
  ** Copyright (c) 2019 Microsoft Corporation
  **********************************************************************
  [vcvarsall.bat] Environment initialized for: 'x64'
  
  C:\Users\Ross&gt;cl
  Microsoft (R) C/C++ Optimizing Compiler Version 19.24.28314 for x64
  Copyright (C) Microsoft Corporation.  All rights reserved.
  
  usage: cl [ option... ] filename... [ /link linkoption... ]
  
  C:\Users\Ross&gt;clang
  'clang' is not recognized as an internal or external command,
  operable program or batch file.
  
  C:\Users\Ross&gt;clang++
  'clang++' is not recognized as an internal or external command,
  operable program or batch file.
  
  C:\Users\Ross&gt;clangcl
  'clangcl' is not recognized as an internal or external command,
  operable program or batch file.
  
  C:\Users\Ross&gt;clang-cl
  'clang-cl' is not recognized as an internal or external command,
  operable program or batch file.
  </code></pre>
  
  <p><strong>UPDATE 26 February, 2020:</strong> Still no satisfactory answer from Microsoft. You can view Microsoft's non-answer and also vote for this issue at: <a href="https://developercommunity.visualstudio.com/idea/875419/how-to-use-msvc-installed-c-clang-tools-for-window.html" rel="noreferrer">https://developercommunity.visualstudio.com/idea/875419/how-to-use-msvc-installed-c-clang-tools-for-window.html</a></p>