Skip to content
Open
Show file tree
Hide file tree
Changes from 3 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
4 changes: 3 additions & 1 deletion bootstrap.example.toml
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,9 @@
# Python interpreter to use for various tasks throughout the build, notably
# rustdoc tests, the lldb python interpreter, and some dist bits and pieces.
#
# Defaults to the Python interpreter used to execute x.py.
# Defaults to the Python interpreter used to execute x.py, or /usr/bin/python3
# on macOS. Note that LLDB tests require a Python version compatible with the
# LLDB plugin to be loaded.
#build.python = "python"

# The path to (or name of) the resource compiler executable to use on Windows.
Expand Down
9 changes: 5 additions & 4 deletions src/bootstrap/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1525,10 +1525,11 @@ impl Build {
/// Path to the python interpreter to use
fn python(&self) -> &Path {
if self.config.host_target.ends_with("apple-darwin") {
// Force /usr/bin/python3 on macOS for LLDB tests because we're loading the
// LLDB plugin's compiled module which only works with the system python
// (namely not Homebrew-installed python)
Path::new("/usr/bin/python3")
// LLDB tests require the Python version the LLDB plugin was built for.
// On macOS, the system Python/LLDB are compatible. Many users install
// Homebrew Python but not Homebrew LLVM, so default to system Python.
// Can be overridden via `build.python` for custom LLVM installations.
self.config.python.as_deref().unwrap_or_else(|| Path::new("/usr/bin/python3"))
} else {
self.config
.python
Expand Down
5 changes: 5 additions & 0 deletions src/bootstrap/src/utils/change_tracker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -576,4 +576,9 @@ pub const CONFIG_CHANGE_HISTORY: &[ChangeInfo] = &[
severity: ChangeSeverity::Info,
summary: "`llvm.enzyme` now works with `download-ci-llvm=true`.",
},
ChangeInfo {
change_id: 148636,
severity: ChangeSeverity::Info,
summary: "The `build.python` option is now respected on macOS (previously ignored).",
},
];
Loading