aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2022-03-02 20:04:15 -0500
committerXavier Claessens <xclaesse@gmail.com>2022-03-09 10:38:28 -0500
commiteafb8a8e10c1b520bb2af5b6028ea816236309d5 (patch)
tree16422d304c9b295ba2fb07c5395f1149899f899e /mesonbuild/backend
parent6ec6e0c9ec5a9f0a01fe573cfc76fb26986fbd18 (diff)
downloadmeson-eafb8a8e10c1b520bb2af5b6028ea816236309d5.zip
meson-eafb8a8e10c1b520bb2af5b6028ea816236309d5.tar.gz
meson-eafb8a8e10c1b520bb2af5b6028ea816236309d5.tar.bz2
install: Add --strip option
Diffstat (limited to 'mesonbuild/backend')
-rw-r--r--mesonbuild/backend/backends.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py
index eeb7d62..6a78ed0 100644
--- a/mesonbuild/backend/backends.py
+++ b/mesonbuild/backend/backends.py
@@ -144,6 +144,7 @@ class TargetInstallData:
subproject: str
optional: bool = False
tag: T.Optional[str] = None
+ can_strip: bool = False
def __post_init__(self, outdir_name: str) -> None:
self.out_name = os.path.join(outdir_name, os.path.basename(self.fname))
@@ -1573,7 +1574,8 @@ class Backend:
#
# TODO: Create GNUStrip/AppleStrip/etc. hierarchy for more
# fine-grained stripping of static archives.
- should_strip = not isinstance(t, build.StaticLibrary) and self.get_option_for_target(OptionKey('strip'), t)
+ can_strip = not isinstance(t, build.StaticLibrary)
+ should_strip = can_strip and self.get_option_for_target(OptionKey('strip'), t)
assert isinstance(should_strip, bool), 'for mypy'
# Install primary build output (library/executable/jar, etc)
# Done separately because of strip/aliases/rpath
@@ -1584,7 +1586,7 @@ class Backend:
install_dir_name,
should_strip, mappings, t.rpath_dirs_to_remove,
t.install_rpath, install_mode, t.subproject,
- tag=tag)
+ tag=tag, can_strip=can_strip)
d.targets.append(i)
for alias, to, tag in t.get_aliases():