File tree Expand file tree Collapse file tree 1 file changed +13
-2
lines changed Expand file tree Collapse file tree 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) {
7878
7979 // We need cmake, but only if we're actually building LLVM or sanitizers.
8080 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) ;
8386 if building_llvm || build. config . sanitizers {
8487 cmd_finder. must_have ( "cmake" ) ;
8588 }
@@ -106,6 +109,14 @@ pub fn check(build: &mut Build) {
106109 build. config . ninja = true ;
107110 }
108111 }
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+ }
109120 }
110121
111122 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