@@ -90,6 +90,7 @@ pub struct Config {
90
90
// llvm codegen options
91
91
pub llvm_skip_rebuild : bool ,
92
92
pub llvm_assertions : bool ,
93
+ pub llvm_plugins : bool ,
93
94
pub llvm_optimize : bool ,
94
95
pub llvm_thin_lto : bool ,
95
96
pub llvm_release_debuginfo : bool ,
@@ -104,6 +105,7 @@ pub struct Config {
104
105
pub llvm_use_linker : Option < String > ,
105
106
pub llvm_allow_old_toolchain : bool ,
106
107
pub llvm_polly : bool ,
108
+ pub llvm_clang : bool ,
107
109
pub llvm_from_ci : bool ,
108
110
109
111
pub use_lld : bool ,
@@ -415,6 +417,7 @@ struct Llvm {
415
417
thin_lto : Option < bool > ,
416
418
release_debuginfo : Option < bool > ,
417
419
assertions : Option < bool > ,
420
+ plugins : Option < bool > ,
418
421
ccache : Option < StringOrBool > ,
419
422
version_check : Option < bool > ,
420
423
static_libstdcpp : Option < bool > ,
@@ -432,6 +435,7 @@ struct Llvm {
432
435
use_linker : Option < String > ,
433
436
allow_old_toolchain : Option < bool > ,
434
437
polly : Option < bool > ,
438
+ clang : Option < bool > ,
435
439
download_ci_llvm : Option < StringOrBool > ,
436
440
}
437
441
@@ -702,6 +706,7 @@ impl Config {
702
706
// Store off these values as options because if they're not provided
703
707
// we'll infer default values for them later
704
708
let mut llvm_assertions = None ;
709
+ let mut llvm_plugins = None ;
705
710
let mut debug = None ;
706
711
let mut debug_assertions = None ;
707
712
let mut debug_assertions_std = None ;
@@ -724,6 +729,7 @@ impl Config {
724
729
}
725
730
set ( & mut config. ninja_in_file , llvm. ninja ) ;
726
731
llvm_assertions = llvm. assertions ;
732
+ llvm_plugins = llvm. plugins ;
727
733
llvm_skip_rebuild = llvm_skip_rebuild. or ( llvm. skip_rebuild ) ;
728
734
set ( & mut config. llvm_optimize , llvm. optimize ) ;
729
735
set ( & mut config. llvm_thin_lto , llvm. thin_lto ) ;
@@ -744,6 +750,7 @@ impl Config {
744
750
config. llvm_use_linker = llvm. use_linker . clone ( ) ;
745
751
config. llvm_allow_old_toolchain = llvm. allow_old_toolchain . unwrap_or ( false ) ;
746
752
config. llvm_polly = llvm. polly . unwrap_or ( false ) ;
753
+ config. llvm_clang = llvm. clang . unwrap_or ( false ) ;
747
754
config. llvm_from_ci = match llvm. download_ci_llvm {
748
755
Some ( StringOrBool :: String ( s) ) => {
749
756
assert ! ( s == "if-available" , "unknown option `{}` for download-ci-llvm" , s) ;
@@ -790,6 +797,8 @@ impl Config {
790
797
check_ci_llvm ! ( llvm. use_linker) ;
791
798
check_ci_llvm ! ( llvm. allow_old_toolchain) ;
792
799
check_ci_llvm ! ( llvm. polly) ;
800
+ check_ci_llvm ! ( llvm. clang) ;
801
+ check_ci_llvm ! ( llvm. plugins) ;
793
802
794
803
// CI-built LLVM can be either dynamic or static.
795
804
let ci_llvm = config. out . join ( & * config. build . triple ) . join ( "ci-llvm" ) ;
@@ -952,6 +961,7 @@ impl Config {
952
961
953
962
config. llvm_skip_rebuild = llvm_skip_rebuild. unwrap_or ( false ) ;
954
963
config. llvm_assertions = llvm_assertions. unwrap_or ( false ) ;
964
+ config. llvm_plugins = llvm_plugins. unwrap_or ( false ) ;
955
965
config. rust_optimize = optimize. unwrap_or ( true ) ;
956
966
957
967
let default = debug == Some ( true ) ;
0 commit comments