Skip to content

Commit

Permalink
Disable cwd remapping if debug build is requested in build-sbf (solan…
Browse files Browse the repository at this point in the history
…a-labs#30601)

CWD remapping removes absolute path prefixes from the path strings in
generated binary files. The paths are needed for source level
debugging.
  • Loading branch information
dmakarov authored Mar 7, 2023
1 parent 36d7738 commit 7361fe2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sdk/cargo-build-sbf/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 7361fe2

Please sign in to comment.