From c7e8d913326e2c8dff57d986cee2153addafab94 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Tue, 6 Oct 2020 17:04:18 +0200 Subject: [PATCH] Windows: Fix lookup of LLVM_INSTALL_DIR environment variables "_ARCH_" was dynamically replaced by either 32 or 64 in qttools/configure.pri. Anyhow, this is not supported by the CMake build, and not needed, since we only build with 64 toolchains on Windows. the qmake builds can still automatically select the "right" toolchain by either loading LLVM_INSTALL_DIR_msvc, LLVM_INSTALL_DIR_mingw. But for CMake builds we now explicitly set LLVM_INSTALL_DIR in each configuration. Fixes: QTBUG-87215 Change-Id: Iaa7e6eab676c03b34ea723d9f71888ca9ee7bb1f Reviewed-by: Qt CI Bot Reviewed-by: Alexandru Croitor --- coin/platform_configs/cmake_platforms.yaml | 12 +++++++++--- coin/provisioning/common/windows/libclang.ps1 | 4 ++-- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/coin/platform_configs/cmake_platforms.yaml b/coin/platform_configs/cmake_platforms.yaml index 8bccd6a7..d34477f2 100644 --- a/coin/platform_configs/cmake_platforms.yaml +++ b/coin/platform_configs/cmake_platforms.yaml @@ -66,7 +66,9 @@ Configurations: Configure arguments: '-G"Ninja Multi-Config" -DCMAKE_CONFIGURATION_TYPES="RelWithDebInfo;Debug" -DFEATURE_msvc_obj_debug_info=ON -DBUILD_EXAMPLES=OFF -DBUILD_WITH_PCH=OFF -DOPENSSL_ROOT_DIR={{.Env.OPENSSL_INCLUDE_x64}}\.. -DFEATURE_system_zlib=OFF -DPostgreSQL_ROOT={{.Env.POSTGRESQL_LIB_x64}}\.. -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache' Environment variables: [ 'NON_QTBASE_CONFIGURE_ARGS=-DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache', - 'TEST_CONFIGURE_ARGS=-DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache'] + 'TEST_CONFIGURE_ARGS=-DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache', + 'LLVM_INSTALL_DIR={{.Env.LLVM_INSTALL_DIR_msvc}}' + ] - Template: 'qtci-windows-10-x86_64-51' Compiler: 'MSVC2019' @@ -106,5 +108,9 @@ Configurations: Compiler: 'Mingw' Features: ['Packaging', 'Sccache'] Configure arguments: '-DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=RelWithDebInfo -DFEATURE_separate_debug_info=ON -DBUILD_EXAMPLES=OFF -DOPENSSL_ROOT_DIR={{.Env.OPENSSL_INCLUDE_x64}}\.. -DFEATURE_system_zlib=OFF -DFEATURE_system_tiff=OFF -DFEATURE_system_freetype=OFF -DFEATURE_system_jpeg=OFF -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache -DPostgreSQL_ROOT={{.Env.POSTGRESQL_LIB_x64}}\..' - Environment variables: ['Path={{.Env.MINGW810}}\bin;{{.Env.Path}}', 'NON_QTBASE_CONFIGURE_ARGS=-DFEATURE_system_tiff=OFF -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache', - 'TEST_CONFIGURE_ARGS=-DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache'] + Environment variables: [ + 'Path={{.Env.MINGW810}}\bin;{{.Env.Path}}', + 'NON_QTBASE_CONFIGURE_ARGS=-DFEATURE_system_tiff=OFF -DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache', + 'TEST_CONFIGURE_ARGS=-DCMAKE_C_COMPILER_LAUNCHER=sccache -DCMAKE_CXX_COMPILER_LAUNCHER=sccache', + 'LLVM_INSTALL_DIR={{.Env.LLVM_INSTALL_DIR_mingw}}' + ] diff --git a/coin/provisioning/common/windows/libclang.ps1 b/coin/provisioning/common/windows/libclang.ps1 index c20c7bc4..53233a45 100644 --- a/coin/provisioning/common/windows/libclang.ps1 +++ b/coin/provisioning/common/windows/libclang.ps1 @@ -60,9 +60,9 @@ if ( $toolchain -eq "mingw" ) { install $sha1 $baseDestination-$archVer if ( $setDefault ) { - Set-EnvironmentVariable "LLVM_INSTALL_DIR" ($baseDestination + "-_ARCH_") + Set-EnvironmentVariable "LLVM_INSTALL_DIR" ($baseDestination + "-$archVer") } -Set-EnvironmentVariable ("LLVM_INSTALL_DIR_" + $toolchainSuffix) ($baseDestination + "-_ARCH_") +Set-EnvironmentVariable ("LLVM_INSTALL_DIR_${toolchainSuffix}") ($baseDestination + "-$archVer") if ( $libclang_version -eq "100" ) { # This is a hacked static build of libclang which requires special