File tree 1 file changed +13
-2
lines changed
1 file changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -78,8 +78,11 @@ pub fn check(build: &mut Build) {
78
78
79
79
// We need cmake, but only if we're actually building LLVM or sanitizers.
80
80
let building_llvm = build. hosts . iter ( )
81
- . filter_map ( |host| build. config . target_config . get ( host) )
82
- . any ( |config| config. llvm_config . is_none ( ) ) ;
81
+ . map ( |host| build. config . target_config
82
+ . get ( host)
83
+ . map ( |config| config. llvm_config . is_none ( ) )
84
+ . unwrap_or ( true ) )
85
+ . any ( |build_llvm_ourselves| build_llvm_ourselves) ;
83
86
if building_llvm || build. config . sanitizers {
84
87
cmd_finder. must_have ( "cmake" ) ;
85
88
}
@@ -106,6 +109,14 @@ pub fn check(build: &mut Build) {
106
109
build. config . ninja = true ;
107
110
}
108
111
}
112
+
113
+ if build. config . lldb_enabled {
114
+ cmd_finder. must_have ( "swig" ) ;
115
+ let out = output ( Command :: new ( "swig" ) . arg ( "-version" ) ) ;
116
+ if !out. contains ( "SWIG Version 3" ) && !out. contains ( "SWIG Version 4" ) {
117
+ panic ! ( "Ensure that Swig 3.x.x or 4.x.x is installed." ) ;
118
+ }
119
+ }
109
120
}
110
121
111
122
build. config . python = build. config . python . take ( ) . map ( |p| cmd_finder. must_have ( p) )
You can’t perform that action at this time.
0 commit comments