@@ -264,7 +264,6 @@ macro_rules! tool {
264264 $name: ident, $path: expr, $tool_name: expr, $mode: expr
265265 $( , llvm_tools = $llvm: expr) *
266266 $( , is_external_tool = $external: expr) *
267- $( , cargo_test_root = $cargo_test_root: expr) *
268267 ;
269268 ) +) => {
270269 #[ derive( Copy , PartialEq , Eq , Clone ) ]
@@ -288,15 +287,6 @@ macro_rules! tool {
288287 $( Tool :: $name => false $( || $llvm) * , ) +
289288 }
290289 }
291-
292- /// Whether this tool requires may run Cargo for test crates,
293- /// which currently needs setting the environment variable
294- /// `__CARGO_TEST_ROOT` to separate it from the workspace.
295- pub fn needs_cargo_test_root( & self ) -> bool {
296- match self {
297- $( Tool :: $name => false $( || $cargo_test_root) * , ) +
298- }
299- }
300290 }
301291
302292 impl <' a> Builder <' a> {
@@ -372,9 +362,8 @@ tool!(
372362 UnstableBookGen , "src/tools/unstable-book-gen" , "unstable-book-gen" , Mode :: ToolBootstrap ;
373363 Tidy , "src/tools/tidy" , "tidy" , Mode :: ToolBootstrap ;
374364 Linkchecker , "src/tools/linkchecker" , "linkchecker" , Mode :: ToolBootstrap ;
375- CargoTest , "src/tools/cargotest" , "cargotest" , Mode :: ToolBootstrap , cargo_test_root = true ;
376- Compiletest , "src/tools/compiletest" , "compiletest" , Mode :: ToolBootstrap ,
377- llvm_tools = true , cargo_test_root = true ;
365+ CargoTest , "src/tools/cargotest" , "cargotest" , Mode :: ToolBootstrap ;
366+ Compiletest , "src/tools/compiletest" , "compiletest" , Mode :: ToolBootstrap , llvm_tools = true ;
378367 BuildManifest , "src/tools/build-manifest" , "build-manifest" , Mode :: ToolBootstrap ;
379368 RemoteTestClient , "src/tools/remote-test-client" , "remote-test-client" , Mode :: ToolBootstrap ;
380369 RustInstaller , "src/tools/rust-installer" , "fabricate" , Mode :: ToolBootstrap ,
@@ -693,11 +682,6 @@ impl<'a> Builder<'a> {
693682 }
694683 }
695684
696- // Set `__CARGO_TEST_ROOT` to the build directory if needed.
697- if tool. needs_cargo_test_root ( ) {
698- cmd. env ( "__CARGO_TEST_ROOT" , & self . config . out ) ;
699- }
700-
701685 add_lib_path ( lib_paths, cmd) ;
702686 }
703687
0 commit comments