@@ -90,6 +90,7 @@ pub struct Config {
90
90
pub codegen_tests : bool ,
91
91
pub nodejs : Option < PathBuf > ,
92
92
pub gdb : Option < PathBuf > ,
93
+ pub python : Option < PathBuf > ,
93
94
}
94
95
95
96
/// Per-target configuration stored in the global configuration structure.
@@ -130,6 +131,7 @@ struct Build {
130
131
gdb : Option < String > ,
131
132
vendor : Option < bool > ,
132
133
nodejs : Option < String > ,
134
+ python : Option < String > ,
133
135
}
134
136
135
137
/// TOML representation of how the LLVM build is configured.
@@ -237,6 +239,7 @@ impl Config {
237
239
config. cargo = build. cargo . map ( PathBuf :: from) ;
238
240
config. nodejs = build. nodejs . map ( PathBuf :: from) ;
239
241
config. gdb = build. gdb . map ( PathBuf :: from) ;
242
+ config. python = build. python . map ( PathBuf :: from) ;
240
243
set ( & mut config. compiler_docs , build. compiler_docs ) ;
241
244
set ( & mut config. docs , build. docs ) ;
242
245
set ( & mut config. submodules , build. submodules ) ;
@@ -465,6 +468,10 @@ impl Config {
465
468
self . rustc = Some ( push_exe_path ( path. clone ( ) , & [ "bin" , "rustc" ] ) ) ;
466
469
self . cargo = Some ( push_exe_path ( path, & [ "bin" , "cargo" ] ) ) ;
467
470
}
471
+ "CFG_PYTHON" if value. len ( ) > 0 => {
472
+ let path = parse_configure_path ( value) ;
473
+ self . python = Some ( path) ;
474
+ }
468
475
_ => { }
469
476
}
470
477
}
0 commit comments