Skip to content

Commit

Permalink
generic: Avoid stripping binaries when a debug build is requested (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
elprans authored Jan 10, 2025
1 parent 8ccb2ad commit ca522a7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions metapkg/targets/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -783,6 +783,10 @@ def build_date(self) -> datetime.datetime:
def build_parallelism(self) -> int:
return self._jobs

@property
def is_debug_build(self) -> bool:
return self._build_debug

def get_source_abspath(self) -> pathlib.Path:
raise NotImplementedError

Expand Down
3 changes: 2 additions & 1 deletion metapkg/targets/generic/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,8 @@ def _fixup_binaries(self, files: list[pathlib.Path]) -> None:
if self.target.is_binary_code_file(self, full_path):
bin_paths[file.name].add(inst_path)
binaries.add(inst_path)
self._strip(image_root, file)
if not self.is_debug_build:
self._strip(image_root, file)
if self.target.is_dynamically_linked(self, full_path):
self._fixup_rpath(image_root, file)
refs[inst_path] = self.target.get_shlib_refs(
Expand Down

0 comments on commit ca522a7

Please sign in to comment.