fix: autostrip caught wrong binaries

Signed-off-by: sisungo <[email protected]>
This commit is contained in:
2026-06-13 12:13:59 +08:00
parent a3690e710c
commit d61c4ab118
2 changed files with 4 additions and 5 deletions
+2 -3
View File
@@ -12,10 +12,9 @@ pre_build: dict[str, PreBuild] = {
"autopatch": autopatch.autopatch,
}
post_build: dict[str, PostBuild] = {
"autostrip": autostrip.autostrip,
}
post_build: dict[str, PostBuild] = {}
post_pack: dict[str, PostPack] = {
"autolink": autolink.autolink,
"autostrip": autostrip.autostrip,
}
+2 -2
View File
@@ -11,8 +11,8 @@ def _is_elf(filepath):
return f.read(4) == b"\x7fELF"
def autostrip():
for ent in common.treedir("."):
def autostrip(composer):
for ent in common.treedir(composer.workdir):
if not ent.is_file(follow_symlinks=False):
continue
if not (os.access(ent.path, os.X_OK) or ".so" in ent.name):