Instead of hardcoding a specific VS install, try sequentially: - %VSINSTALLDIR% (already set from a vs prompt) - 2019/Enterprise - 2019/Professional - 2019/Community - 2019/BuildTools It stops when one is found and set vsdevcmd env var. Differential revision: https://reviews.llvm.org/D135173