Skip to content

Use llvm-config instead of download-ci-llvm in PGO script #113323

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/ci/stage-build.py
Original file line number Diff line number Diff line change
Expand Up @@ -840,15 +840,20 @@ def extract_dist_dir(name: str) -> Path:
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" / f"llvm-config{pipeline.executable_extension()}"
assert llvm_config.is_file()

config_content = f"""profile = "user"
changelog-seen = 2

[build]
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}")

Expand Down