Disable cwd remapping if debug build is requested in build-sbf (#30601)

CWD remapping removes absolute path prefixes from the path strings in
generated binary files. The paths are needed for source level
debugging.
This commit is contained in:
Dmitri Makarov 2023-03-06 21:36:44 -05:00 committed by GitHub
parent 36d773810a
commit 7361fe27f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -699,7 +699,7 @@ fn build_sbf_package(config: &Config, target_directory: &Path, package: &cargo_m
let target_rustflags = env::var(cargo_target).ok();
let mut target_rustflags = Cow::Borrowed(target_rustflags.as_deref().unwrap_or_default());
target_rustflags = Cow::Owned(format!("{} {}", &rustflags, &target_rustflags));
if config.remap_cwd {
if config.remap_cwd && !config.debug {
target_rustflags = Cow::Owned(format!("{} -Zremap-cwd-prefix=", &target_rustflags));
}
if config.debug {