@@ -90,6 +90,7 @@ pub struct Config {
9090 // llvm codegen options
9191 pub llvm_skip_rebuild : bool ,
9292 pub llvm_assertions : bool ,
93+ pub llvm_plugins : bool ,
9394 pub llvm_optimize : bool ,
9495 pub llvm_thin_lto : bool ,
9596 pub llvm_release_debuginfo : bool ,
@@ -104,6 +105,7 @@ pub struct Config {
104105 pub llvm_use_linker : Option < String > ,
105106 pub llvm_allow_old_toolchain : bool ,
106107 pub llvm_polly : bool ,
108+ pub llvm_clang : bool ,
107109 pub llvm_from_ci : bool ,
108110
109111 pub use_lld : bool ,
@@ -415,6 +417,7 @@ struct Llvm {
415417 thin_lto : Option < bool > ,
416418 release_debuginfo : Option < bool > ,
417419 assertions : Option < bool > ,
420+ plugins : Option < bool > ,
418421 ccache : Option < StringOrBool > ,
419422 version_check : Option < bool > ,
420423 static_libstdcpp : Option < bool > ,
@@ -432,6 +435,7 @@ struct Llvm {
432435 use_linker : Option < String > ,
433436 allow_old_toolchain : Option < bool > ,
434437 polly : Option < bool > ,
438+ clang : Option < bool > ,
435439 download_ci_llvm : Option < StringOrBool > ,
436440}
437441
@@ -702,6 +706,7 @@ impl Config {
702706 // Store off these values as options because if they're not provided
703707 // we'll infer default values for them later
704708 let mut llvm_assertions = None ;
709+ let mut llvm_plugins = None ;
705710 let mut debug = None ;
706711 let mut debug_assertions = None ;
707712 let mut debug_assertions_std = None ;
@@ -724,6 +729,7 @@ impl Config {
724729 }
725730 set ( & mut config. ninja_in_file , llvm. ninja ) ;
726731 llvm_assertions = llvm. assertions ;
732+ llvm_plugins = llvm. plugins ;
727733 llvm_skip_rebuild = llvm_skip_rebuild. or ( llvm. skip_rebuild ) ;
728734 set ( & mut config. llvm_optimize , llvm. optimize ) ;
729735 set ( & mut config. llvm_thin_lto , llvm. thin_lto ) ;
@@ -744,6 +750,7 @@ impl Config {
744750 config. llvm_use_linker = llvm. use_linker . clone ( ) ;
745751 config. llvm_allow_old_toolchain = llvm. allow_old_toolchain . unwrap_or ( false ) ;
746752 config. llvm_polly = llvm. polly . unwrap_or ( false ) ;
753+ config. llvm_clang = llvm. clang . unwrap_or ( false ) ;
747754 config. llvm_from_ci = match llvm. download_ci_llvm {
748755 Some ( StringOrBool :: String ( s) ) => {
749756 assert ! ( s == "if-available" , "unknown option `{}` for download-ci-llvm" , s) ;
@@ -790,6 +797,8 @@ impl Config {
790797 check_ci_llvm ! ( llvm. use_linker) ;
791798 check_ci_llvm ! ( llvm. allow_old_toolchain) ;
792799 check_ci_llvm ! ( llvm. polly) ;
800+ check_ci_llvm ! ( llvm. clang) ;
801+ check_ci_llvm ! ( llvm. plugins) ;
793802
794803 // CI-built LLVM can be either dynamic or static.
795804 let ci_llvm = config. out . join ( & * config. build . triple ) . join ( "ci-llvm" ) ;
@@ -952,6 +961,7 @@ impl Config {
952961
953962 config. llvm_skip_rebuild = llvm_skip_rebuild. unwrap_or ( false ) ;
954963 config. llvm_assertions = llvm_assertions. unwrap_or ( false ) ;
964+ config. llvm_plugins = llvm_plugins. unwrap_or ( false ) ;
955965 config. rust_optimize = optimize. unwrap_or ( true ) ;
956966
957967 let default = debug == Some ( true ) ;
0 commit comments