File tree 1 file changed +26
-0
lines changed
1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -131,6 +131,30 @@ fn prepare_libcore(
131
131
) ?;
132
132
}
133
133
println ! ( "Successfully prepared libcore for building" ) ;
134
+
135
+ Ok ( ( ) )
136
+ }
137
+
138
+ // TODO: remove when we can ignore warnings in rustdoc tests.
139
+ fn prepare_rand ( ) -> Result < ( ) , String > {
140
+ // Apply patch for the rand crate.
141
+ let file_path = "patches/crates/0001-Remove-deny-warnings.patch" ;
142
+ let rand_dir = Path :: new ( "build/rand" ) ;
143
+ println ! ( "[GIT] apply `{}`" , file_path) ;
144
+ let path = Path :: new ( "../.." ) . join ( file_path) ;
145
+ run_command_with_output ( & [ & "git" , & "apply" , & path] , Some ( rand_dir) ) ?;
146
+ run_command_with_output ( & [ & "git" , & "add" , & "-A" ] , Some ( rand_dir) ) ?;
147
+ run_command_with_output (
148
+ & [
149
+ & "git" ,
150
+ & "commit" ,
151
+ & "--no-gpg-sign" ,
152
+ & "-m" ,
153
+ & format ! ( "Patch {}" , path. display( ) ) ,
154
+ ] ,
155
+ Some ( rand_dir) ,
156
+ ) ?;
157
+
134
158
Ok ( ( ) )
135
159
}
136
160
@@ -241,6 +265,8 @@ pub fn run() -> Result<(), String> {
241
265
for ( repo_url, checkout_commit, cb) in to_clone {
242
266
clone_and_setup ( repo_url, checkout_commit, * cb) ?;
243
267
}
268
+
269
+ prepare_rand ( ) ?;
244
270
}
245
271
246
272
println ! ( "Successfully ran `prepare`" ) ;
You can’t perform that action at this time.
0 commit comments