@@ -90,6 +90,7 @@ pub struct Config {
9090 pub codegen_tests : bool ,
9191 pub nodejs : Option < PathBuf > ,
9292 pub gdb : Option < PathBuf > ,
93+ pub python : Option < PathBuf > ,
9394}
9495
9596/// Per-target configuration stored in the global configuration structure.
@@ -130,6 +131,7 @@ struct Build {
130131 gdb : Option < String > ,
131132 vendor : Option < bool > ,
132133 nodejs : Option < String > ,
134+ python : Option < String > ,
133135}
134136
135137/// TOML representation of how the LLVM build is configured.
@@ -237,6 +239,7 @@ impl Config {
237239 config. cargo = build. cargo . map ( PathBuf :: from) ;
238240 config. nodejs = build. nodejs . map ( PathBuf :: from) ;
239241 config. gdb = build. gdb . map ( PathBuf :: from) ;
242+ config. python = build. python . map ( PathBuf :: from) ;
240243 set ( & mut config. compiler_docs , build. compiler_docs ) ;
241244 set ( & mut config. docs , build. docs ) ;
242245 set ( & mut config. submodules , build. submodules ) ;
@@ -465,6 +468,10 @@ impl Config {
465468 self . rustc = Some ( push_exe_path ( path. clone ( ) , & [ "bin" , "rustc" ] ) ) ;
466469 self . cargo = Some ( push_exe_path ( path, & [ "bin" , "cargo" ] ) ) ;
467470 }
471+ "CFG_PYTHON" if value. len ( ) > 0 => {
472+ let path = parse_configure_path ( value) ;
473+ self . python = Some ( path) ;
474+ }
468475 _ => { }
469476 }
470477 }
0 commit comments