Skip to content

Commit c4c84df

Browse files
committedJul 6, 2023
Auto merge of #113323 - Kobzol:pgo-script-llvm-ci, r=jyn514
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. r? `@jyn514`
2 parents 4b6749b + 12b75fe commit c4c84df

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed
 

‎src/ci/stage-build.py

+7-2
Original file line numberDiff line numberDiff line change
@@ -840,15 +840,20 @@ def extract_dist_dir(name: str) -> Path:
840840
cargo_path = cargo_dir / "bin" / f"cargo{pipeline.executable_extension()}"
841841
assert cargo_path.is_file()
842842

843+
# Specify path to a LLVM config so that LLVM is not rebuilt.
844+
# It doesn't really matter which LLVM config we choose, because no sysroot will be compiled.
845+
llvm_config = pipeline.build_artifacts() / "llvm" / "bin" / f"llvm-config{pipeline.executable_extension()}"
846+
assert llvm_config.is_file()
847+
843848
config_content = f"""profile = "user"
844849
changelog-seen = 2
845850
846851
[build]
847852
rustc = "{rustc_path.as_posix()}"
848853
cargo = "{cargo_path.as_posix()}"
849854
850-
[llvm]
851-
download-ci-llvm = true
855+
[target.{PGO_HOST}]
856+
llvm-config = "{llvm_config.as_posix()}"
852857
"""
853858
logging.info(f"Using following `config.toml` for running tests:\n{config_content}")
854859

0 commit comments

Comments
 (0)
Please sign in to comment.