diff --git a/buildbot/osuosl/master/config/builders.py b/buildbot/osuosl/master/config/builders.py --- a/buildbot/osuosl/master/config/builders.py +++ b/buildbot/osuosl/master/config/builders.py @@ -809,7 +809,9 @@ 'factory' : ClangBuilder.getClangCMakeBuildFactory( clean=True, checkout_lld=False, - vs="autodetect", + # autodetection Visual Studio 2019 installation + vs="autodetect19", + # Compile for 32bit windows vs_target_arch='x86', testStage1=True, useTwoStage=True, @@ -817,6 +819,7 @@ stage2_config='Release', extra_cmake_args=['-DLLVM_ENABLE_ASSERTIONS=ON', '-DLLVM_TARGETS_TO_BUILD=X86', + # enable SCCACHE '-DCMAKE_C_COMPILER_LAUNCHER=sccache', '-DCMAKE_CXX_COMPILER_LAUNCHER=sccache', ])}, diff --git a/zorg/buildbot/builders/Util.py b/zorg/buildbot/builders/Util.py --- a/zorg/buildbot/builders/Util.py +++ b/zorg/buildbot/builders/Util.py @@ -23,6 +23,13 @@ vcvars_command = "for /f \"tokens=* USEBACKQ\" %%F in " \ "(`\"%ProgramFiles(x86)%\\Microsoft Visual Studio\\Installer\\vswhere.exe\" -latest -property installationPath`) DO " \ "\"%%F\"\\VC\\Auxiliary\\Build\\vcvarsall.bat" + elif vs.lower() == "autodetect19": + # The autodetection does not work with Vistual Studio 2019, see https://github.com/microsoft/vswhere/issues/103 + # We need an additional "-products *" argument. Not sure if this is backwards-compatible with all + # Visual Studio 2017versions, so creating a separate option for this. + vcvars_command = "for /f \"tokens=* USEBACKQ\" %%F in " \ + "(`\"%ProgramFiles(x86)%\\Microsoft Visual Studio\\Installer\\vswhere.exe\" -products * -latest -property installationPath`) DO " \ + "\"%%F\"\\VC\\Auxiliary\\Build\\vcvarsall.bat" else: # Older versions of VS vcvars_command = "\"" + "\\".join((vs, '..','..','VC', 'vcvarsall.bat')) + "\""