Skip to content

Commit 85f7a6e

Browse files
committed
Move Android-related discovery out of core::debuggers
While some of this information is needed by debugger discovery, it is also needed by non-debuginfo tests, so the code doesn't belong in the `debuggers` module.
1 parent d427ddf commit 85f7a6e

File tree

4 files changed

+5
-9
lines changed

4 files changed

+5
-9
lines changed
File renamed without changes.

src/bootstrap/src/core/build_steps/test.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ use crate::core::builder::{
2929
};
3030
use crate::core::config::TargetSelection;
3131
use crate::core::config::flags::{Subcommand, get_completion, top_level_help};
32-
use crate::core::debuggers;
32+
use crate::core::{android, debuggers};
3333
use crate::utils::build_stamp::{self, BuildStamp};
3434
use crate::utils::exec::{BootstrapCommand, command};
3535
use crate::utils::helpers::{
@@ -2114,12 +2114,9 @@ Please disable assertions with `rust.debug-assertions = false`.
21142114
builder.config.python.as_ref().expect("python is required for running rustdoc tests"),
21152115
);
21162116

2117-
// FIXME(#148099): Currently we set these Android-related flags in all
2118-
// modes, even though they should only be needed in "debuginfo" mode,
2119-
// because the GDB-discovery code in compiletest currently assumes that
2120-
// `--android-cross-path` is always set for Android targets.
2121-
if let Some(debuggers::Android { adb_path, adb_test_dir, android_cross_path }) =
2122-
debuggers::discover_android(builder, target)
2117+
// Discover and set some flags related to running tests on Android targets.
2118+
if let Some(android::Android { adb_path, adb_test_dir, android_cross_path }) =
2119+
android::discover_android(builder, target)
21232120
{
21242121
cmd.arg("--adb-path").arg(adb_path);
21252122
cmd.arg("--adb-test-dir").arg(adb_test_dir);
Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
//! Code for discovering debuggers and debugger-related configuration, so that
22
//! it can be passed to compiletest when running debuginfo tests.
33
4-
pub(crate) use self::android::{Android, discover_android};
54
pub(crate) use self::gdb::{Gdb, discover_gdb};
65
pub(crate) use self::lldb::{Lldb, discover_lldb};
76

8-
mod android;
97
mod gdb;
108
mod lldb;

src/bootstrap/src/core/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
pub(crate) mod android;
12
pub(crate) mod build_steps;
23
pub(crate) mod builder;
34
pub(crate) mod config;

0 commit comments

Comments
 (0)