File tree Expand file tree Collapse file tree 4 files changed +17
-22
lines changed Expand file tree Collapse file tree 4 files changed +17
-22
lines changed Original file line number Diff line number Diff line change @@ -2075,7 +2075,9 @@ Please disable assertions with `rust.debug-assertions = false`.
20752075 cmd. arg ( "--target-rustcflags" ) . arg ( flag) ;
20762076 }
20772077
2078- cmd. arg ( "--python" ) . arg ( builder. python ( ) ) ;
2078+ cmd. arg ( "--python" ) . arg (
2079+ builder. config . python . as_ref ( ) . expect ( "python is required for running rustdoc tests" ) ,
2080+ ) ;
20792081
20802082 // FIXME(#148099): Currently we set these Android-related flags in all
20812083 // modes, even though they should only be needed in "debuginfo" mode,
@@ -3359,7 +3361,9 @@ impl Step for BootstrapPy {
33593361 }
33603362
33613363 fn run ( self , builder : & Builder < ' _ > ) -> Self :: Output {
3362- let mut check_bootstrap = command ( builder. python ( ) ) ;
3364+ let mut check_bootstrap = command (
3365+ builder. config . python . as_ref ( ) . expect ( "python is required for running bootstrap tests" ) ,
3366+ ) ;
33633367 check_bootstrap
33643368 . args ( [ "-m" , "unittest" , "bootstrap_test.py" ] )
33653369 // Forward command-line args after `--` to unittest, for filtering etc.
Original file line number Diff line number Diff line change 1- //! Sanity checking performed by bootstrap before actually executing anything .
1+ //! Sanity checking and tool selection performed by bootstrap .
22//!
3- //! This module contains the implementation of ensuring that the build
4- //! environment looks reasonable before progressing. This will verify that
5- //! various programs like git and python exist, along with ensuring that all C
6- //! compilers for cross-compiling are found.
3+ //! This module ensures that the build environment is correctly set up before
4+ //! executing any build tasks. It verifies required programs exist (like git and
5+ //! cmake when needed), selects some tools based on the environment (like the
6+ //! Python interpreter), and validates that C compilers for cross-compiling are
7+ //! available.
78//!
89//! In theory if we get past this phase it's a bug if a build fails, but in
910//! practice that's likely not true!
Original file line number Diff line number Diff line change @@ -1522,21 +1522,6 @@ impl Build {
15221522 self . config . target_config . get ( & target) . and_then ( |t| t. qemu_rootfs . as_ref ( ) ) . map ( |p| & * * p)
15231523 }
15241524
1525- /// Path to the python interpreter to use
1526- fn python ( & self ) -> & Path {
1527- if self . config . host_target . ends_with ( "apple-darwin" ) {
1528- // Force /usr/bin/python3 on macOS for LLDB tests because we're loading the
1529- // LLDB plugin's compiled module which only works with the system python
1530- // (namely not Homebrew-installed python)
1531- Path :: new ( "/usr/bin/python3" )
1532- } else {
1533- self . config
1534- . python
1535- . as_ref ( )
1536- . expect ( "python is required for running LLDB or rustdoc tests" )
1537- }
1538- }
1539-
15401525 /// Temporary directory that extended error information is emitted to.
15411526 fn extended_error_dir ( & self ) -> PathBuf {
15421527 self . out . join ( "tmp/extended-error-metadata" )
Original file line number Diff line number Diff line change @@ -576,4 +576,9 @@ pub const CONFIG_CHANGE_HISTORY: &[ChangeInfo] = &[
576576 severity : ChangeSeverity :: Info ,
577577 summary : "`llvm.enzyme` now works with `download-ci-llvm=true`." ,
578578 } ,
579+ ChangeInfo {
580+ change_id : 148636 ,
581+ severity : ChangeSeverity :: Info ,
582+ summary : "The `build.python` option is now respected on macOS (previously ignored)." ,
583+ } ,
579584] ;
You can’t perform that action at this time.
0 commit comments