From e38fb3a509f66c9c1802c15f54e3c0b13ddfa5b6 Mon Sep 17 00:00:00 2001 From: Hiroshi Miura Date: Sun, 6 Oct 2024 08:30:00 +0900 Subject: [PATCH 1/8] chore(ci): azure: add a case win64_llvm_mingw Signed-off-by: Hiroshi Miura --- ci/generate_azure_pipelines_matrices.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ci/generate_azure_pipelines_matrices.py b/ci/generate_azure_pipelines_matrices.py index b06994da..78af7d0d 100644 --- a/ci/generate_azure_pipelines_matrices.py +++ b/ci/generate_azure_pipelines_matrices.py @@ -136,6 +136,15 @@ def __init__(self, platform, build_jobs): "desktop", "win64_msvc2019_arm64", "msvc2019_arm64", + is_autodesktop=True, # Should install win64_msvc2019_arm64 in parallel + ), + BuildJob( + "install-qt", + "6.7.3", + "windows", + "desktop", + "win64_llvm_mingw", + "llvm_mingw", is_autodesktop=True, # Should install win64_msvc2019_arm64 in parallel ), BuildJob( From 7cfd15a58596c59cec92ce2dcbb16d68f64e3a94 Mon Sep 17 00:00:00 2001 From: Hiroshi Miura Date: Sun, 6 Oct 2024 08:42:15 +0900 Subject: [PATCH 2/8] fix: arch_dir of win64_llvm_mingw - set arch_dir to be llvm_mingw_64 Signed-off-by: Hiroshi Miura --- aqt/metadata.py | 2 +- aqt/updater.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/aqt/metadata.py b/aqt/metadata.py index 2d488ccb..fd24e45a 100644 --- a/aqt/metadata.py +++ b/aqt/metadata.py @@ -387,7 +387,7 @@ def dir_for_version(ver: Version) -> str: @staticmethod def get_arch_dir_name(host: str, arch: str, version: Version) -> str: - if arch.startswith("win64_mingw"): + if arch.startswith("win64") and arch.endswith("mingw"): return arch[6:] + "_64" elif arch.startswith("win32_mingw"): return arch[6:] + "_32" diff --git a/aqt/updater.py b/aqt/updater.py index e891bd9c..849fb9b1 100644 --- a/aqt/updater.py +++ b/aqt/updater.py @@ -228,7 +228,7 @@ def make_qtenv2(self, base_dir, qt_version, arch_dir): f.write("echo Remember to call vcvarsall.bat to complete environment setup!\n") def set_license(self, base_dir: str, qt_version: str, arch_dir: str): - """Update qtconfig.pri as OpenSource""" + """Update qconfig.pri as OpenSource""" with open(os.path.join(base_dir, qt_version, arch_dir, "mkspecs", "qconfig.pri"), "r+") as f: lines = f.readlines() f.seek(0) From bcc97e047f900f2f8072750934837045d4973fa0 Mon Sep 17 00:00:00 2001 From: Hiroshi Miura Date: Sun, 6 Oct 2024 09:53:15 +0900 Subject: [PATCH 3/8] Update ci/generate_azure_pipelines_matrices.py --- ci/generate_azure_pipelines_matrices.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/generate_azure_pipelines_matrices.py b/ci/generate_azure_pipelines_matrices.py index 78af7d0d..1e3d5217 100644 --- a/ci/generate_azure_pipelines_matrices.py +++ b/ci/generate_azure_pipelines_matrices.py @@ -144,7 +144,7 @@ def __init__(self, platform, build_jobs): "windows", "desktop", "win64_llvm_mingw", - "llvm_mingw", + "llvm_mingw_64", is_autodesktop=True, # Should install win64_msvc2019_arm64 in parallel ), BuildJob( From 7371504db19420d230c15a3ba94fe103d40abd45 Mon Sep 17 00:00:00 2001 From: Hiroshi Miura Date: Sun, 6 Oct 2024 10:33:08 +0900 Subject: [PATCH 4/8] Update aqt/metadata.py --- aqt/metadata.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/aqt/metadata.py b/aqt/metadata.py index fd24e45a..a14f4a78 100644 --- a/aqt/metadata.py +++ b/aqt/metadata.py @@ -387,8 +387,10 @@ def dir_for_version(ver: Version) -> str: @staticmethod def get_arch_dir_name(host: str, arch: str, version: Version) -> str: - if arch.startswith("win64") and arch.endswith("mingw"): + if arch.startswith("win64_mingw"): return arch[6:] + "_64" + elif arch.startswith("win64_llvm"): + return "llvm-" + arch[11:] + "_64" elif arch.startswith("win32_mingw"): return arch[6:] + "_32" elif arch.startswith("win"): From 430e0f4359b03ea3b4afcda20303a61aca831a52 Mon Sep 17 00:00:00 2001 From: Hiroshi Miura Date: Sun, 6 Oct 2024 10:34:12 +0900 Subject: [PATCH 5/8] Update ci/generate_azure_pipelines_matrices.py --- ci/generate_azure_pipelines_matrices.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/generate_azure_pipelines_matrices.py b/ci/generate_azure_pipelines_matrices.py index 1e3d5217..75bb14c1 100644 --- a/ci/generate_azure_pipelines_matrices.py +++ b/ci/generate_azure_pipelines_matrices.py @@ -144,7 +144,7 @@ def __init__(self, platform, build_jobs): "windows", "desktop", "win64_llvm_mingw", - "llvm_mingw_64", + "llvm-mingw_64", is_autodesktop=True, # Should install win64_msvc2019_arm64 in parallel ), BuildJob( From 20f8b7b3b8a69713d0ff8bb0843ac7aab0115ff5 Mon Sep 17 00:00:00 2001 From: Dave Dalcino Date: Sun, 6 Oct 2024 14:03:20 -0700 Subject: [PATCH 6/8] attempt fix for installation of llvm mingw --- ci/generate_azure_pipelines_matrices.py | 28 +++++++++++++++++++++++-- ci/steps.yml | 4 ++-- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/ci/generate_azure_pipelines_matrices.py b/ci/generate_azure_pipelines_matrices.py index 75bb14c1..a75c313c 100644 --- a/ci/generate_azure_pipelines_matrices.py +++ b/ci/generate_azure_pipelines_matrices.py @@ -75,10 +75,32 @@ def win_autodesk_qt_bindir(self) -> str: return self.autodesk_qt_bindir(sep='\\') def mingw_folder(self) -> str: + """ + Tool variant -> folder name + -------------------- ----------------- + win64_llvm_mingw1706 -> llvm-mingw1706_64 + win64_mingw1310 -> mingw1310_64 + win64_mingw900 -> mingw1120_64 (tool contains mingw 11.2.0 instead of 9.0.0) + win64_mingw810 -> mingw810_64 + """ if not self.mingw_variant: return "" - match = re.match(r"^win(\d+)_(mingw\d+)$", self.mingw_variant) - return f"{match[2]}_{match[1]}" + match = re.match(r"^win(?P\d+)_(?Pllvm_)?(?Pmingw\d+)$", self.mingw_variant) + if match.group('llvm'): + return f"llvm-{match.group('mingw')}_{match.group('bits')}" + if match.group('mingw') == "mingw900": # tool contains mingw 11.2.0, not 9.0.0 + return f"mingw1120_{match.group('bits')}" + return f"{match.group('mingw')}_{match.group('bits')}" + + def mingw_tool_name(self) -> str: + if self.mingw_variant == "win64_mingw900": + return "tools_mingw90" + elif self.mingw_variant == "win64_mingw1310": + return "tools_mingw1310" + elif self.mingw_variant == "win64_llvm_mingw1706": + return "tools_llvm_mingw1706" + else: + return "tools_mingw" class PlatformBuildJobs: @@ -145,6 +167,7 @@ def __init__(self, platform, build_jobs): "desktop", "win64_llvm_mingw", "llvm-mingw_64", + mingw_variant="win64_llvm_mingw1706", is_autodesktop=True, # Should install win64_msvc2019_arm64 in parallel ), BuildJob( @@ -300,6 +323,7 @@ def __init__(self, platform, build_jobs): ("SUBARCHIVES", build_job.subarchives if build_job.subarchives else ""), ("SPEC", build_job.spec if build_job.spec else ""), ("MINGW_VARIANT", build_job.mingw_variant), + ("MINGW_TOOL_NAME", build_job.mingw_tool_name()), ("MINGW_FOLDER", build_job.mingw_folder()), ("IS_AUTODESKTOP", str(build_job.is_autodesktop)), ("HAS_WASM", build_job.list_options.get("HAS_WASM", "True")), diff --git a/ci/steps.yml b/ci/steps.yml index dd7742ee..272935f4 100644 --- a/ci/steps.yml +++ b/ci/steps.yml @@ -289,7 +289,7 @@ steps: jom } elseif ( $env:TOOLCHAIN -eq 'MINGW' ) { python -m aqt install-tool $(if (($QT_BASE_MIRROR + "") -ne "") { "-b $QT_BASE_MIRROR" } else {""}) ` - --outputdir $(Build.BinariesDirectory)/Qt $(HOST) desktop tools_mingw qt.tools.$(MINGW_VARIANT) + --outputdir $(Build.BinariesDirectory)/Qt $(HOST) desktop $(MINGW_TOOL_NAME) qt.tools.$(MINGW_VARIANT) if ($?) { Write-Host 'Successfully installed tools_mingw' } else { @@ -354,7 +354,7 @@ steps: Write-Host "Path == " + $env:Path if (![bool] (Get-Command -ErrorAction Ignore -Type Application mingw32-make)) { python -m aqt install-tool $(if (($QT_BASE_MIRROR + "") -ne "") { "-b $QT_BASE_MIRROR" } else {""}) ` - --outputdir $(Build.BinariesDirectory)/Qt $(HOST) desktop tools_mingw qt.tools.$(MINGW_VARIANT) + --outputdir $(Build.BinariesDirectory)/Qt $(HOST) desktop $(MINGW_TOOL_NAME) qt.tools.$(MINGW_VARIANT) if ($?) { Write-Host 'Successfully installed tools_mingw' } else { From ff4fef3d1c5497948fb13b35d082bb642df56d4f Mon Sep 17 00:00:00 2001 From: Dave Dalcino Date: Sun, 6 Oct 2024 14:17:43 -0700 Subject: [PATCH 7/8] black --- aqt/metadata.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aqt/metadata.py b/aqt/metadata.py index a14f4a78..03d6f770 100644 --- a/aqt/metadata.py +++ b/aqt/metadata.py @@ -390,7 +390,7 @@ def get_arch_dir_name(host: str, arch: str, version: Version) -> str: if arch.startswith("win64_mingw"): return arch[6:] + "_64" elif arch.startswith("win64_llvm"): - return "llvm-" + arch[11:] + "_64" + return "llvm-" + arch[11:] + "_64" elif arch.startswith("win32_mingw"): return arch[6:] + "_32" elif arch.startswith("win"): From adce6e546589281c68c2a08fcd294f259c41e245 Mon Sep 17 00:00:00 2001 From: Hiroshi Miura Date: Fri, 11 Oct 2024 09:35:08 +0900 Subject: [PATCH 8/8] Update ci/generate_azure_pipelines_matrices.py Ignore autodesktop for llvm-mingw case --- ci/generate_azure_pipelines_matrices.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/generate_azure_pipelines_matrices.py b/ci/generate_azure_pipelines_matrices.py index a75c313c..bfb56f22 100644 --- a/ci/generate_azure_pipelines_matrices.py +++ b/ci/generate_azure_pipelines_matrices.py @@ -168,7 +168,7 @@ def __init__(self, platform, build_jobs): "win64_llvm_mingw", "llvm-mingw_64", mingw_variant="win64_llvm_mingw1706", - is_autodesktop=True, # Should install win64_msvc2019_arm64 in parallel + is_autodesktop=False, ), BuildJob( # Archives stored as .zip