Skip to content

Commit 0aee267

Browse files
author
Vladimir Makayev
committed
add support to override lldb binary path for ./x test
1 parent aed2187 commit 0aee267

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

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

+4-3
Original file line numberDiff line numberDiff line change
@@ -1927,15 +1927,16 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
19271927
.to_string()
19281928
})
19291929
};
1930-
let lldb_exe = "lldb";
1931-
let lldb_version = Command::new(lldb_exe)
1930+
1931+
let lldb_exe = builder.config.lldb.clone().unwrap_or_else(|| PathBuf::from("lldb"));
1932+
let lldb_version = Command::new(&lldb_exe)
19321933
.arg("--version")
19331934
.output()
19341935
.map(|output| String::from_utf8_lossy(&output.stdout).to_string())
19351936
.ok();
19361937
if let Some(ref vers) = lldb_version {
19371938
cmd.arg("--lldb-version").arg(vers);
1938-
let lldb_python_dir = run(Command::new(lldb_exe).arg("-P")).ok();
1939+
let lldb_python_dir = run(Command::new(&lldb_exe).arg("-P")).ok();
19391940
if let Some(ref dir) = lldb_python_dir {
19401941
cmd.arg("--lldb-python-dir").arg(dir);
19411942
}

src/bootstrap/src/core/config/config.rs

+4
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,7 @@ pub struct Config {
329329
pub nodejs: Option<PathBuf>,
330330
pub npm: Option<PathBuf>,
331331
pub gdb: Option<PathBuf>,
332+
pub lldb: Option<PathBuf>,
332333
pub python: Option<PathBuf>,
333334
pub reuse: Option<PathBuf>,
334335
pub cargo_native_static: bool,
@@ -832,6 +833,7 @@ define_config! {
832833
docs_minification: Option<bool> = "docs-minification",
833834
submodules: Option<bool> = "submodules",
834835
gdb: Option<String> = "gdb",
836+
lldb: Option<String> = "lldb",
835837
nodejs: Option<String> = "nodejs",
836838
npm: Option<String> = "npm",
837839
python: Option<String> = "python",
@@ -1408,6 +1410,7 @@ impl Config {
14081410
docs_minification,
14091411
submodules,
14101412
gdb,
1413+
lldb,
14111414
nodejs,
14121415
npm,
14131416
python,
@@ -1500,6 +1503,7 @@ impl Config {
15001503
config.nodejs = nodejs.map(PathBuf::from);
15011504
config.npm = npm.map(PathBuf::from);
15021505
config.gdb = gdb.map(PathBuf::from);
1506+
config.lldb = lldb.map(PathBuf::from);
15031507
config.python = python.map(PathBuf::from);
15041508
config.reuse = reuse.map(PathBuf::from);
15051509
config.submodules = submodules;

0 commit comments

Comments
 (0)