From be99bb9cbfd4d97b7b74be50d3bb675c960f5e30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Ber=C3=A1nek?= Date: Tue, 4 Jul 2023 15:37:19 +0200 Subject: [PATCH 1/2] Use `llvm-config` instead of `download-ci-llvm` in PGO script This should avoid CI breakage when the LLVM stamp is updated, and also it will avoid an unnecessary LLVM download from CI. --- src/ci/stage-build.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/ci/stage-build.py b/src/ci/stage-build.py index 3f30b69e8f4..1b68d21e2a9 100755 --- a/src/ci/stage-build.py +++ b/src/ci/stage-build.py @@ -840,6 +840,11 @@ def run_tests(pipeline: Pipeline): cargo_path = cargo_dir / "bin" / f"cargo{pipeline.executable_extension()}" assert cargo_path.is_file() + # Specify path to a LLVM config so that LLVM is not rebuilt. + # It doesn't really matter which LLVM config we choose, because no sysroot will be compiled. + llvm_config = pipeline.build_artifacts() / "llvm" / "bin" / "llvm-config" + assert llvm_config.is_file() + config_content = f"""profile = "user" changelog-seen = 2 @@ -847,8 +852,8 @@ changelog-seen = 2 rustc = "{rustc_path.as_posix()}" cargo = "{cargo_path.as_posix()}" -[llvm] -download-ci-llvm = true +[target.{PGO_HOST}] +llvm-config = "{llvm_config.as_posix()}" """ logging.info(f"Using following `config.toml` for running tests:\n{config_content}") From 12b75fe18b42d6a2995bf86af2c22961d6888b42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Ber=C3=A1nek?= Date: Thu, 6 Jul 2023 00:06:24 +0200 Subject: [PATCH 2/2] Fix LLVM config path on Windows --- src/ci/stage-build.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ci/stage-build.py b/src/ci/stage-build.py index 1b68d21e2a9..8640a3e0f34 100755 --- a/src/ci/stage-build.py +++ b/src/ci/stage-build.py @@ -842,7 +842,7 @@ def run_tests(pipeline: Pipeline): # Specify path to a LLVM config so that LLVM is not rebuilt. # It doesn't really matter which LLVM config we choose, because no sysroot will be compiled. - llvm_config = pipeline.build_artifacts() / "llvm" / "bin" / "llvm-config" + llvm_config = pipeline.build_artifacts() / "llvm" / "bin" / f"llvm-config{pipeline.executable_extension()}" assert llvm_config.is_file() config_content = f"""profile = "user"